Opened 4 years ago

Closed 4 years ago

# Simplifications in the computation of the inverse of a transition map

Reported by: Owned by: egourgoulhon major sage-8.5 geometry manifold, coordinate chart, transition map tscrim Eric Gourgoulhon Travis Scrimshaw N/A 2f76562 2f76562e84e34872457793e5f277fed30e672c1a

### Description

We have currently:

```sage: M = Manifold(2, 'M')
sage: c_xy.<x,y> = M.chart()
sage: c_uv.<u,v> = M.chart()
sage: phi = var('phi', domain='real')
sage: xy_to_uv = c_xy.transition_map(c_uv, [cos(phi)*x + sin(phi)*y,
....:                                       -sin(phi)*x + cos(phi)*y])
sage: xy_to_uv.inverse().display()
x = (u*cos(phi) - v*sin(phi))/(cos(phi)^2 + sin(phi)^2)
y = (v*cos(phi) + u*sin(phi))/(cos(phi)^2 + sin(phi)^2)
```

Clearly the inverse transition map lacks simplification. This results from a bug in the method `CoordChange.inverse()`, which makes the simplification ineffective. With this ticket, the last line becomes

```sage: xy_to_uv.inverse().display()
x = u*cos(phi) - v*sin(phi)
y = v*cos(phi) + u*sin(phi)
```

In addition, this ticket removes the auxiliary symbolic variables `xxxx*` that have been introduced by `CoordChange.inverse()` from the list of assumptions: after the above code is run, we have currently:

```sage: assumptions()
[x is real,
y is real,
u is real,
v is real,
phi is real,
xxxx0 is real,
xxxx1 is real]
```

With this ticket, this becomes:

```sage: assumptions()
[x is real, y is real, u is real, v is real, phi is real]
```

### comment:1 Changed 4 years ago by egourgoulhon

• Branch set to public/manifolds/simplification_inverse_transition_map
• Commit set to 2f76562e84e34872457793e5f277fed30e672c1a

New commits:

 ​2f76562 `Perform simplifications in the inverse of a transition map`

### comment:2 Changed 4 years ago by egourgoulhon

• Status changed from new to needs_review

### comment:3 follow-up: ↓ 4 Changed 4 years ago by tscrim

• Reviewers set to Travis Scrimshaw
• Status changed from needs_review to positive_review

LGTM.

Thanks Travis!

### comment:5 Changed 4 years ago by vbraun

• Branch changed from public/manifolds/simplification_inverse_transition_map to 2f76562e84e34872457793e5f277fed30e672c1a
• Resolution set to fixed
• Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.