Theorem: Notes.len_insert_eq_succ_len (Notes4/IndPred2.lean)

State before:
α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a : α
l : List α
⊢ List.length (insert r a []) = List.length [] + 1
Tactic:
simp [insert]
State after:
no goals

State before:
α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a : α
l : List α
a' : α
as : List α
h : r a a'
⊢ List.length (insert r a (a' :: as)) = List.length (a' :: as) + 1
Tactic:
simp [insert, h]
State after:
no goals

State before:
α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a : α
l : List α
a' : α
as : List α
h : ¬r a a'
⊢ List.length (insert r a (a' :: as)) = List.length (a' :: as) + 1
Tactic:
simp [insert, h]
State after:
α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a : α
l : List α
a' : α
as : List α
h : ¬r a a'
⊢ List.length (insert r a as) = List.length as + 1

State before:
α : Type
r : α → α → Prop
inst✝ : DecidableRel r
a : α
l : List α
a' : α
as : List α
h : ¬r a a'
⊢ List.length (insert r a as) = List.length as + 1
Tactic:
apply len_insert_eq_succ_len
State after:
no goals