Theorem: Multiset.antidiagonal_eq_map_powerset
File: Mathlib/Data/Multiset/Antidiagonal.lean

tactic: induction' s using Multiset.induction_on with a s hs
state_before: α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
s : Multiset α
⊢ s.antidiagonal = map (fun t => (s - t, t)) s.powerset
state_after: case empty
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
⊢ antidiagonal 0 = map (fun t => (0 - t, t)) (powerset 0)

case cons
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
a : α
s : Multiset α
hs : s.antidiagonal = map (fun t => (s - t, t)) s.powerset
⊢ (a ::ₘ s).antidiagonal = map (fun t => (a ::ₘ s - t, t)) (a ::ₘ s).powerset

tactic: simp only [antidiagonal_zero, powerset_zero, zero_tsub, map_singleton]
state_before: case empty
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
⊢ antidiagonal 0 = map (fun t => (0 - t, t)) (powerset 0)
state_after: no goals

tactic: simp_rw [antidiagonal_cons, powerset_cons, map_add, hs, map_map, Function.comp, Prod.map_mk,
  id, sub_cons, erase_cons_head]
state_before: case cons
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
a : α
s : Multiset α
hs : s.antidiagonal = map (fun t => (s - t, t)) s.powerset
⊢ (a ::ₘ s).antidiagonal = map (fun t => (a ::ₘ s - t, t)) (a ::ₘ s).powerset
state_after: case cons
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
a : α
s : Multiset α
hs : s.antidiagonal = map (fun t => (s - t, t)) s.powerset
⊢ map (fun x => (s - x, a ::ₘ x)) s.powerset + map (fun x => (a ::ₘ (s - x), x)) s.powerset =
    map (fun x => (a ::ₘ s - x, x)) s.powerset + map (fun x => (s - x, a ::ₘ x)) s.powerset

tactic: rw [add_comm]
state_before: case cons
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
a : α
s : Multiset α
hs : s.antidiagonal = map (fun t => (s - t, t)) s.powerset
⊢ map (fun x => (s - x, a ::ₘ x)) s.powerset + map (fun x => (a ::ₘ (s - x), x)) s.powerset =
    map (fun x => (a ::ₘ s - x, x)) s.powerset + map (fun x => (s - x, a ::ₘ x)) s.powerset
state_after: case cons
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
a : α
s : Multiset α
hs : s.antidiagonal = map (fun t => (s - t, t)) s.powerset
⊢ map (fun x => (a ::ₘ (s - x), x)) s.powerset + map (fun x => (s - x, a ::ₘ x)) s.powerset =
    map (fun x => (a ::ₘ s - x, x)) s.powerset + map (fun x => (s - x, a ::ₘ x)) s.powerset

tactic: congr 1
state_before: case cons
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
a : α
s : Multiset α
hs : s.antidiagonal = map (fun t => (s - t, t)) s.powerset
⊢ map (fun x => (a ::ₘ (s - x), x)) s.powerset + map (fun x => (s - x, a ::ₘ x)) s.powerset =
    map (fun x => (a ::ₘ s - x, x)) s.powerset + map (fun x => (s - x, a ::ₘ x)) s.powerset
state_after: case cons.e_a
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
a : α
s : Multiset α
hs : s.antidiagonal = map (fun t => (s - t, t)) s.powerset
⊢ map (fun x => (a ::ₘ (s - x), x)) s.powerset = map (fun x => (a ::ₘ s - x, x)) s.powerset

tactic: refine Multiset.map_congr rfl fun x hx ↦ ?_
state_before: case cons.e_a
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
a : α
s : Multiset α
hs : s.antidiagonal = map (fun t => (s - t, t)) s.powerset
⊢ map (fun x => (a ::ₘ (s - x), x)) s.powerset = map (fun x => (a ::ₘ s - x, x)) s.powerset
state_after: case cons.e_a
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
a : α
s : Multiset α
hs : s.antidiagonal = map (fun t => (s - t, t)) s.powerset
x : Multiset α
hx : x ∈ s.powerset
⊢ (a ::ₘ (s - x), x) = (a ::ₘ s - x, x)

tactic: rw [cons_sub_of_le _ (mem_powerset.mp hx)]
state_before: case cons.e_a
α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
a : α
s : Multiset α
hs : s.antidiagonal = map (fun t => (s - t, t)) s.powerset
x : Multiset α
hx : x ∈ s.powerset
⊢ (a ::ₘ (s - x), x) = (a ::ₘ s - x, x)
state_after: no goals