cfahlgren1/math / lean /OAI /Combinatorics /BinaryEdit /EncodingUpper.lean
cfahlgren1's picture
download
raw
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

Xet Storage Details

Size:
765 Bytes
·
Xet hash:
a46ec50bc8c98a26178c63b97814b0c5cb37b6fe65afe13209fc7468bac0ca91

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.