Lax489179.EncodingProperties
Integer encodings and distinct 3-SUM entries
concepts/Lax489179/EncodingProperties.lean · lax-489179
No public endorsements yet.
Loading review…
Sign in with ORCIDConcept map
Evidence
This concept declares 5 statements. Each proof establishes one of them relative to its assumptions.
1st statement decode_encode_int proven
2nd statement decode_encode_option proven
3rd statement encode_int_injective proven
4th statement encode_option_injective proven
5th statement three_entries proven
Lemma
The signed-integer and optional-integer decoders are left inverses of their encoders. In particular, both encodings are injective. A 3-SUM yes-instance has at least three entries.
Lean source view on GitHub
| 1 | import Lax489179.IntegerEncoding |
| 2 | import Lax489179.ThreeSUM |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Integer encodings and distinct 3-SUM entries |
| 7 | type: lemma |
| 8 | --- |
| 9 | The signed-integer and optional-integer decoders are left inverses of |
| 10 | their encoders. In particular, both encodings are injective. A 3-SUM |
| 11 | yes-instance has at least three entries. |
| 12 | -/ |
| 13 | |
| 14 | namespace Lax489179.EncodingProperties |
| 15 | |
| 16 | open IntegerEncoding |
| 17 | |
| 18 | axiom decode_encode_int (z : ℤ) : decodeInt (encodeInt z) = z |
| 19 | |
| 20 | axiom decode_encode_option (z : Option ℤ) : decodeOption (encodeOption z) = z |
| 21 | |
| 22 | axiom encode_int_injective : Function.Injective encodeInt |
| 23 | |
| 24 | axiom encode_option_injective : Function.Injective encodeOption |
| 25 | |
| 26 | axiom three_entries (input : List ℤ) (h : ThreeSUM.HasZeroSum input) : 3 ≤ input.length |
| 27 | |
| 28 | end Lax489179.EncodingProperties |
| 29 |
Community review
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above; your ORCID profile must share a public name.
0 comments