Opened 5 years ago

Closed 5 years ago

# Fix connected sum of knots

Reported by: Owned by: mmarco major sage-8.3 algebraic topology connected_sum, knot slelievre Miguel Marco Samuel Lelièvre N/A d8cb5c1 d8cb5c1fd9b25a4b9d5c089dddca1c9db4010245

As pointed in https://ask.sagemath.org/question/41985/connected-sum-of-knots/ the connected sum of knots is not correctly computed.

Before this ticket, the connected sum of the trefoil knot with itself is incorrect, and computing the connected sum with a third trefoil knot fails:

```sage: c = Knot.connected_sum
sage: B = BraidGroup(2)
sage: t = Knot(B([1, 1, 1])); t
Knot represented by 3 crossings
sage: tt = c(t, t); tt
Knot represented by 7 crossings
sage: tt_t = c(tt, t); tt_t
Traceback (most recent call last)
...
ValueError: the input has more than 1 connected component
sage: t_tt = c(t, tt); t_tt
Traceback (most recent call last)
...
ValueError: generators not in the group
```

After this ticket, these problems are fixed:

```sage: c = Knot.connected_sum
sage: B = BraidGroup(2)
sage: t = Knot(B([1, 1, 1])); t
Knot represented by 3 crossings
sage: tt = c(t, t); tt
Knot represented by 6 crossings
sage: t_tt = c(t, tt); t_tt
Knot represented by 9 crossings
sage: tt_t = c(tt, t); tt_t
Knot represented by 9 crossings
sage: t_tt = tt_t
True
```

### comment:1 Changed 5 years ago by mmarco

Branch: → u/mmarco/connected_sum_of_knots_is_incorrect

### comment:2 Changed 5 years ago by mmarco

Commit: → d8cb5c1fd9b25a4b9d5c089dddca1c9db4010245 new → needs_review

New commits:

 ​d8cb5c1 `Compute the connected sum from the oriented gauss code`

### comment:3 Changed 5 years ago by slelievre

Keywords: connected_sum knot added needs_review → positive_review

This makes `connected_sum` correct (and a little faster it seems!).

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

Description: modified (diff) Connected sum of knots is incorrect → Fix connected sum of knots

### comment:5 Changed 5 years ago by slelievre

Description: modified (diff)

### comment:6 Changed 5 years ago by chapoton

Reviewers: → ​Samuel Lelièvre

### comment:7 Changed 5 years ago by davidloeffler

Milestone: sage-8.2 → sage-8.3

### comment:8 Changed 5 years ago by mmarco

Why hasn't this been merged?

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

Reviewers: ​Samuel Lelièvre → Samuel Lelièvre

There was an invisible unicode in the reviewer name

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

Branch: u/mmarco/connected_sum_of_knots_is_incorrect → d8cb5c1fd9b25a4b9d5c089dddca1c9db4010245 → fixed positive_review → closed
Note: See TracTickets for help on using tickets.