Opened 5 years ago

Closed 5 years ago

# Wrong certificate from is_relatively_complemented

Reported by: Owned by: jmantysalo major sage-8.1 combinatorics tscrim, chapoton Jori Mäntysalo Frédéric Chapoton N/A 0f8598d 0f8598dd5777e669d8d6b4b6bf266e291dc279b0

### Description

```L = LatticePoset(DiGraph('IYOS`G?CE?@?C?_@??'))
L.is_relatively_complemented(certificate=True)
```

May output `(False, (1, 8, 9))`, but the certificate should be `(7, 8, 9)`. The bug may not be visible in all architechtures.

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

• Branch set to u/jmantysalo/wrong_certificate_from_is_relatively_complemented

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

• Authors set to Jori Mäntysalo
• Commit set to fc8aa42b88f967dd65d736b9c31b0006acf96f13
• Status changed from new to needs_review

Corrected. Test code:

```for i in range(1000):
L = Posets.RandomLattice(10, 0.99)
result = L.is_relatively_complemented(certificate=True)
if not result[0]:
a, b, c = result[1]
ac = L.interval(a, c)
if len(ac) != 3 or b != ac[1]:
print("BUG!")
break
else:
print("All OK")
```

Contains also three non-related trivial "are are" typos.

New commits:

 ​fc8aa42 `Correct certificate for (not) relatively complemented lattice.`

### comment:3 follow-up: ↓ 5 Changed 5 years ago by chapoton

• Reviewers set to Frédéric Chapoton

Could you please correct another typo (same line as the first "are are"):

```when these are not stongly
```

should be "strongly"

once done, you can set to positive

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

• Commit changed from fc8aa42b88f967dd65d736b9c31b0006acf96f13 to 0f8598dd5777e669d8d6b4b6bf266e291dc279b0

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

 ​0f8598d `A typo.`

### comment:5 in reply to: ↑ 3 Changed 5 years ago by jmantysalo

• Status changed from needs_review to positive_review

```when these are not stongly
```

should be "strongly"

Done. Good catch, thanks.

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

• Branch changed from u/jmantysalo/wrong_certificate_from_is_relatively_complemented to 0f8598dd5777e669d8d6b4b6bf266e291dc279b0
• Resolution set to fixed
• Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.