Download lean/OAI/Combinatorics/BinaryEdit/EncodingUpper.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 765 Bytes
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Combinatorics/BinaryEdit/EncodingUpper.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/Combinatorics/BinaryEdit/EncodingUpper.lean
-
curl -L -o EncodingUpper.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Combinatorics/BinaryEdit/EncodingUpper.lean
765 Bytes
| import OAI.Combinatorics.BinaryEdit.Model | |
| import OAI.Combinatorics.TreeEdit.EditMetric | |
| namespace OAI | |
| namespace TreeEdit.BinaryLower | |
| universe u v | |
| /-- The real-valued form of the upper estimate used in `thm:804`. -/ | |
| theorem encode_editDistance_le_real {α : Type u} {β : Type v} {P : ℕ} | |
| (c : α → Word β P) (x y : List α) : | |
| (ed (encode c x) (encode c y) : ℝ) ≤ | |
| (P : ℝ) * (ed x y : ℝ) := by | |
| exact_mod_cast ed_encode_le c x y | |
| /-- Width `M²` and input length `M` give output length exactly `M³`. -/ | |
| theorem length_encode_cube {α : Type u} {β : Type v} {M : ℕ} | |
| (c : α → Word β (M ^ 2)) (x : Word α M) : | |
| (encode c x.val).length = M ^ 3 := by | |
| rw [length_encode, x.property] | |
| ring | |
| end TreeEdit.BinaryLower | |
| end OAI | |