TheoremfurtherAll_mod
Statement
theorem furtherAll_mod : ∀ {B : SBasis} {a : AProgram} {Bs : List SBasis}, furtherAllB B a = true →
AProgram.bases B a = some Bs → ∀ i (h : i < a.length) (h' : i < Bs.length), FurtherMod Bs[i] a[i]
| _, [], _, _, _, i, h, _ => absurd h (by simp)
| B, m :: rest, Bs, hf, hb, i, h, h' => by
simp only [furtherAllB] at hf
simp only [AProgram.bases] at hb
cases hm : m.result B with
| none => rw [hm] at hf; cases hf
| some p =>
obtain ⟨B', E⟩Proof
p
rw [hm] at hf hb
simp only [Bool.and_eq_true] at hf
simp only at hb
cases hbr : AProgram.bases (B.plus B') rest with
| none => rw [hbr] at hb; cases hb
| some Bs' =>
rw [hbr] at hb
simp only [Option.map_some, Option.some.injEq] at hb
subst hb
cases i with
| zero =>
show FurtherMod B m
unfold FurtherMod; rw [hm]; exact furtherModInB_sound hf.1
| succ j =>
exact furtherAll_mod hf.2 hbr j (by simpa using h) (by simpa using h')Proved by a term, which Lean's kernel checks directly.
Theorems it uses
Used by
In StandardElmMech/Stat/Complete/Discharge.lean: Step 11, milestone (g): Stat.wCheck, legal_of_W, ident_of_wCheck, programSem_of_wCheck (D11 discharged test by test), not_legal_of_wMainVar (A96's flags refusal), principalExistsCore_of_covers, principalExistsMod_of_covers, d11For_of_agree; Lean's pipeline with W, endToEndW (step 10's endToEnd with W in place of step 9's inference), with endToEndW_of_wCheck (the per-test spec_ from wcheck_, without a second run of the inference), specOf_of_endToEndW, ident_of_endToEndW, programSem_of_endToEndW (step 10's statements, without D11); wCheckIn, wCheck_of_ctx (the W check of a one-module program with the context of its imports given by a lemma ctx_<name>_eq, so the kernel does not compute it per test: an end-to-end shard of 20 tests takes 32 s instead of 98 s).
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.