theorem
proved
tactic proof
oneBitDiff_snocBit_flip
show as:
view Lean formalization →
formal statement (Lean)
143private theorem oneBitDiff_snocBit_flip {d : Nat} (p : Pattern d) :
144 OneBitDiff (snocBit p false) (snocBit p true) := by
proof body
Tactic-mode proof.
145 classical
146 refine ⟨Fin.last d, ?_, ?_⟩
147 · simp
148 · intro j hj
149 induction j using Fin.lastCases with
150 | last => rfl
151 | cast j =>
152 have : False := by
153 -- on old coordinates the patterns are equal
154 simpa [snocBit] using hj
155 exact this.elim
156
157/-! ### Relating `natAdd` vs `addNat` when the sizes match -/
158