Opened 7 months ago

Closed 7 months ago

Last modified 7 months ago

#28921 closed enhancement (fixed)

Mixed Forms - Zero Treatment for Scalar Multiplication

Reported by: gh-DeRhamSource Owned by:
Priority: major Milestone: sage-9.1
Component: geometry Keywords: mixed-forms, manifolds
Cc: tscrim, egourgoulhon Merged in:
Authors: Michael Jung Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 3226bc5 (Commits) Commit:
Dependencies: Stopgaps:

Description (last modified by gh-DeRhamSource)

Now we have:

sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart()
sage: A = M.mixed_form([1,0,0], name='A')
sage: 0*A
Mixed differential form 0/\A on the 2-dimensional differentiable manifold M

Better is:

sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart()
sage: A = M.mixed_form([1,0,0], name='A')
sage: 0*A
Mixed differential form zero on the 2-dimensional differentiable manifold M
sage: (0*A) is M.mixed_form_algebra().zero()
True
sage: 1*A is A
True

Change History (16)

comment:1 Changed 7 months ago by gh-DeRhamSource

  • Branch set to u/gh-DeRhamSource/mixed_forms___zero_treatment_for_scalar_multiplication

comment:2 Changed 7 months ago by gh-DeRhamSource

  • Authors set to Michael Jung
  • Cc tscrim egourgoulhon added
  • Commit set to 87425aa9ca3a0fddbce658ee9caba85d9650d2c9
  • Component changed from PLEASE CHANGE to linear programming
  • Description modified (diff)
  • Keywords mixed-forms manifolds added
  • Status changed from new to needs_review
  • Type changed from PLEASE CHANGE to enhancement

New commits:

87425aaTrac 28921: Simple checks added for _lmul_

comment:3 Changed 7 months ago by gh-DeRhamSource

  • Description modified (diff)

comment:4 Changed 7 months ago by gh-DeRhamSource

  • Component changed from linear programming to geometry

comment:5 follow-up: Changed 7 months ago by tscrim

  • Milestone changed from sage-9.0 to sage-9.1
  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to needs_info

Is the is_one check always quick? Otherwise we shouldn't do it (or implement a faster test).

comment:6 in reply to: ↑ 5 Changed 7 months ago by egourgoulhon

Replying to tscrim:

Is the is_one check always quick? Otherwise we shouldn't do it (or implement a faster test).

For scalar fields is_one is slow, because it amounts to comparing a symbolic expression to 1. For comparing to 1, we don't have the equivalent of the fast method is_trivial_zero.

comment:7 Changed 7 months ago by git

  • Commit changed from 87425aa9ca3a0fddbce658ee9caba85d9650d2c9 to 3226bc5d5a3d917d7d682ec06f4ff08c49cfbb16

Branch pushed to git repo; I updated commit sha1. New commits:

1e046a0Merge branch 'develop' into t/28921/mixed_forms___zero_treatment_for_scalar_multiplication
3226bc5Trac #28921: Trivial one check

comment:8 Changed 7 months ago by gh-DeRhamSource

The base ring is supposed to be the symbolic ring. Anyway, I've changed the check of 1 to a trivial and hence faster one.

Last edited 7 months ago by gh-DeRhamSource (previous) (diff)

comment:9 Changed 7 months ago by gh-DeRhamSource

  • Status changed from needs_info to needs_review

comment:10 Changed 7 months ago by tscrim

  • Status changed from needs_review to positive_review

This should be a much faster check. LGTM.

comment:11 Changed 7 months ago by vbraun

  • Branch changed from u/gh-DeRhamSource/mixed_forms___zero_treatment_for_scalar_multiplication to 3226bc5d5a3d917d7d682ec06f4ff08c49cfbb16
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:12 Changed 7 months ago by gh-DeRhamSource

  • Branch changed from 3226bc5d5a3d917d7d682ec06f4ff08c49cfbb16 to u/gh-DeRhamSource/3226bc5d5a3d917d7d682ec06f4ff08c49cfbb16

comment:13 Changed 7 months ago by gh-DeRhamSource

  • Commit changed from 3226bc5d5a3d917d7d682ec06f4ff08c49cfbb16 to 761012b122166a5e7b00a05d36dfdf071fd6ecb8

New commits:

761012bTrac #28921: Merge branch 'develop' into t/28921/mixed_forms___zero_treatment_for_scalar_multiplication

comment:14 Changed 7 months ago by gh-DeRhamSource

New commits:

761012bTrac #28921: Merge branch 'develop' into t/28921/mixed_forms___zero_treatment_for_scalar_multiplication

comment:15 Changed 7 months ago by gh-DeRhamSource

Damn it. Can this be made undone?

Last edited 7 months ago by gh-DeRhamSource (previous) (diff)

comment:16 Changed 7 months ago by gh-DeRhamSource

  • Branch changed from u/gh-DeRhamSource/3226bc5d5a3d917d7d682ec06f4ff08c49cfbb16 to 3226bc5d5a3d917d7d682ec06f4ff08c49cfbb16
  • Commit 761012b122166a5e7b00a05d36dfdf071fd6ecb8 deleted
Note: See TracTickets for help on using tickets.