cfahlgren1/math / lean /OAI /NumberTheory /Ostmann /Construction /CanonicalOccurrenceTransportScalarTreeBasic.lean
Lean 4 · 7
declarations statementsfull
def rootCode {ι : Type} : {l : ℕ}→TreeCode ι l→StateCode ι body · 2 lines
| 0,e=>e
| _+1,e=>e.1def Plan.rootFrequency : {l : ℕ}→Plan l→ℤ body · 2 lines
| _,.leaf s=>s
| _,.node s _ _ _ _ _ _ _ _=>sdef Plan.leftPlan {l : ℕ} : Plan (l+1)→Plan l body · 1 line
| .node _ _ _ _ _ _ _ left _=>leftdef Plan.rightPlan {l : ℕ} : Plan (l+1)→Plan l body · 1 line
| .node _ _ _ _ _ _ _ _ right=>rightlemma rootCode_treeCode {ι : Type} {l : ℕ} (h : History l) (e : TreeExpr ι h) :
rootCode (treeCode h e)=stateCode (treeRoot h e) := by cases h <;> rfl lemma treeRoot_plus_eq_of_code {ι : Type} {l : ℕ} {h g : History l}
(e : TreeExpr ι h) (f : TreeExpr ι g) (hc : treeCode h e=treeCode g f) :
(treeRoot h e).plus=(treeRoot g f).plus := by proof · 3 lines
have hh := congrArg rootCode hc
rw [rootCode_treeCode,rootCode_treeCode] at hh
exact congrArg StateCode.plus hhlemma plan_rootFrequency {l : ℕ} {V : ℕ→ℕ} {outside : List ℕ}
(h : History l) (hs : h.Supported V outside) :
(plan h hs).rootFrequency=h.root.frequency := by cases h <;> rfl Outline
Xet Storage Details
- Size:
- 1.43 kB
- Xet hash:
- 0a345cf0016f8112983e4aa2a463df029f092050995844e766b36f450a611acb
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.