Buckets:
| import OAI.Combinatorics.EditApproximation.Geometry.ComparisonTree | |
| import OAI.Combinatorics.EditApproximation.Refinement.PhysicalWarmup | |
| namespace OAI | |
| /-! Active comparison states have precisely the corresponding physical source interval. -/ | |
| namespace EditApproximation | |
| theorem comparisonStep_active_parent {α : Type*} (source target : List α) | |
| {M : ℕ} (hM : 0 < M) (P : ℕ) (hP : 66 ≤ P) | |
| (node : ComparisonState source.length target.length) (i : Fin M) | |
| (resultParent : TargetInterval source.length) (resultQ : TargetInterval target.length) | |
| (heq : comparisonStep source target hM P hP node i = some (resultParent, resultQ)) | |
| (hactive : ¬ comparisonStopped source target resultParent resultQ) : | |
| ∃ parent q, node = some (parent, q) ∧ ¬ comparisonStopped source target parent q ∧ | |
| resultParent = sourceChild parent i := by | |
| classical | |
| cases node with | |
| | none => cases heq | |
| | some state => | |
| rcases state with ⟨parent, q⟩ | |
| by_cases hs : comparisonStopped source target parent q | |
| · simp only [comparisonStep, dite_eq_left hs] at heq | |
| split_ifs at heq with hi | |
| · have hpq := Option.some.inj heq | |
| have hp : parent = resultParent := congrArg Prod.fst hpq | |
| have hq : q = resultQ := congrArg Prod.snd hpq | |
| exact False.elim (hactive (by rw [← hp, ← hq]; exact hs)) | |
| · simp only [comparisonStep, dite_eq_right hs] at heq | |
| have hpq := Option.some.inj heq | |
| have hp : sourceChild parent i = resultParent := congrArg Prod.fst hpq | |
| exact ⟨parent, q, rfl, hs, hp.symm⟩ | |
| theorem comparisonFrontier_active_source {α : Type*} (source target : List α) | |
| {M : ℕ} (hM : 0 < M) (P : ℕ) (hP : 66 ≤ P) (rootQ : TargetInterval target.length) | |
| (d : ℕ) (path : TreeLayer M d) (parent : TargetInterval source.length) (q : TargetInterval target.length) | |
| (heq : comparisonFrontier source target hM P hP | |
| (some (sourceIntervalAt M source.length 0 PUnit.unit, rootQ)) d path = some (parent, q)) | |
| (hactive : ¬ comparisonStopped source target parent q) : | |
| parent = sourceIntervalAt M source.length d path := by | |
| induction d generalizing parent q with | |
| | zero => | |
| have hpq := Option.some.inj heq | |
| exact (congrArg Prod.fst hpq).symm | |
| | succ d ih => | |
| obtain ⟨previousParent, previousQ, hprevious, hpreviousActive, hchild⟩ := | |
| comparisonStep_active_parent source target hM P hP _ path.2 parent q heq hactive | |
| have hp := ih path.1 previousParent previousQ hprevious hpreviousActive | |
| rw [hp] at hchild | |
| exact hchild | |
| end EditApproximation | |
| end OAI | |
Xet Storage Details
- Size:
- 2.59 kB
- Xet hash:
- 158adf716892f239c88ba9bcb436aae9f68e0c81410e9b122a742184cfe667e0
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.