Theorem: Finpartition.mem_part_ofSetoid_iff_rel
File: Mathlib/Order/Partition/Finpartition.lean

Proof steps:
state_before: α : Type u_1
inst✝² : DecidableEq α
s✝ t u : Finset α
P : Finpartition s✝
a : α
inst✝¹ : Fintype α
s : Setoid α
inst✝ : DecidableRel Setoid.r
b : α
⊢ b ∈ (ofSetoid s).part a ↔ Setoid.r a b
state_after: α : Type u_1
inst✝² : DecidableEq α
s✝ t u : Finset α
P : Finpartition s✝
a : α
inst✝¹ : Fintype α
s : Setoid α
inst✝ : DecidableRel Setoid.r
b : α
⊢ b ∈ choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) ⋯ ↔ Setoid.r a b
tactic: simp_rw [part, ofSetoid, mem_univ, reduceDIte]
state_before: α : Type u_1
inst✝² : DecidableEq α
s✝ t u : Finset α
P : Finpartition s✝
a : α
inst✝¹ : Fintype α
s : Setoid α
inst✝ : DecidableRel Setoid.r
b : α
⊢ b ∈ choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) ⋯ ↔ Setoid.r a b
state_after: α : Type u_1
inst✝² : DecidableEq α
s✝ t u : Finset α
P : Finpartition s✝
a : α
inst✝¹ : Fintype α
s : Setoid α
inst✝ : DecidableRel Setoid.r
b : α
H : ∃! a_1, a_1 ∈ image (fun a => filter (Setoid.r a) univ) univ ∧ a ∈ a_1
⊢ b ∈ choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H ↔ Setoid.r a b
tactic: generalize_proofs H
state_before: α : Type u_1
inst✝² : DecidableEq α
s✝ t u : Finset α
P : Finpartition s✝
a : α
inst✝¹ : Fintype α
s : Setoid α
inst✝ : DecidableRel Setoid.r
b : α
H : ∃! a_1, a_1 ∈ image (fun a => filter (Setoid.r a) univ) univ ∧ a ∈ a_1
⊢ b ∈ choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H ↔ Setoid.r a b
state_after: α : Type u_1
inst✝² : DecidableEq α
s✝ t u : Finset α
P : Finpartition s✝
a : α
inst✝¹ : Fintype α
s : Setoid α
inst✝ : DecidableRel Setoid.r
b : α
H : ∃! a_1, a_1 ∈ image (fun a => filter (Setoid.r a) univ) univ ∧ a ∈ a_1
this :
  choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H ∈
      image (fun a => filter (Setoid.r a) univ) univ ∧
    a ∈ choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H
⊢ b ∈ choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H ↔ Setoid.r a b
tactic: have := choose_spec _ _ H
state_before: α : Type u_1
inst✝² : DecidableEq α
s✝ t u : Finset α
P : Finpartition s✝
a : α
inst✝¹ : Fintype α
s : Setoid α
inst✝ : DecidableRel Setoid.r
b : α
H : ∃! a_1, a_1 ∈ image (fun a => filter (Setoid.r a) univ) univ ∧ a ∈ a_1
this :
  choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H ∈
      image (fun a => filter (Setoid.r a) univ) univ ∧
    a ∈ choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H
⊢ b ∈ choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H ↔ Setoid.r a b
state_after: α : Type u_1
inst✝² : DecidableEq α
s✝ t u : Finset α
P : Finpartition s✝
a : α
inst✝¹ : Fintype α
s : Setoid α
inst✝ : DecidableRel Setoid.r
b : α
H : ∃! a_1, a_1 ∈ image (fun a => filter (Setoid.r a) univ) univ ∧ a ∈ a_1
this :
  (∃ a_1, filter (Setoid.r a_1) univ = choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H) ∧
    a ∈ choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H
⊢ b ∈ choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H ↔ Setoid.r a b
tactic: simp only [mem_univ, mem_image, true_and] at this
state_before: α : Type u_1
inst✝² : DecidableEq α
s✝ t u : Finset α
P : Finpartition s✝
a : α
inst✝¹ : Fintype α
s : Setoid α
inst✝ : DecidableRel Setoid.r
b : α
H : ∃! a_1, a_1 ∈ image (fun a => filter (Setoid.r a) univ) univ ∧ a ∈ a_1
this :
  (∃ a_1, filter (Setoid.r a_1) univ = choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H) ∧
    a ∈ choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H
⊢ b ∈ choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H ↔ Setoid.r a b
state_after: case intro.intro
α : Type u_1
inst✝² : DecidableEq α
s✝ t u : Finset α
P : Finpartition s✝
a : α
inst✝¹ : Fintype α
s : Setoid α
inst✝ : DecidableRel Setoid.r
b : α
H : ∃! a_1, a_1 ∈ image (fun a => filter (Setoid.r a) univ) univ ∧ a ∈ a_1
this : a ∈ choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H
w✝ : α
hc : filter (Setoid.r w✝) univ = choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H
⊢ b ∈ choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H ↔ Setoid.r a b
tactic: obtain ⟨⟨_, hc⟩, this⟩ := this
state_before: case intro.intro
α : Type u_1
inst✝² : DecidableEq α
s✝ t u : Finset α
P : Finpartition s✝
a : α
inst✝¹ : Fintype α
s : Setoid α
inst✝ : DecidableRel Setoid.r
b : α
H : ∃! a_1, a_1 ∈ image (fun a => filter (Setoid.r a) univ) univ ∧ a ∈ a_1
this : a ∈ choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H
w✝ : α
hc : filter (Setoid.r w✝) univ = choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H
⊢ b ∈ choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H ↔ Setoid.r a b
state_after: case intro.intro
α : Type u_1
inst✝² : DecidableEq α
s✝ t u : Finset α
P : Finpartition s✝
a : α
inst✝¹ : Fintype α
s : Setoid α
inst✝ : DecidableRel Setoid.r
b : α
H : ∃! a_1, a_1 ∈ image (fun a => filter (Setoid.r a) univ) univ ∧ a ∈ a_1
w✝ : α
hc : filter (Setoid.r w✝) univ = choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H
this : Setoid.r w✝ a
⊢ Setoid.r w✝ b ↔ Setoid.r a b
tactic: simp only [← hc, mem_univ, mem_filter, true_and] at this ⊢
state_before: case intro.intro
α : Type u_1
inst✝² : DecidableEq α
s✝ t u : Finset α
P : Finpartition s✝
a : α
inst✝¹ : Fintype α
s : Setoid α
inst✝ : DecidableRel Setoid.r
b : α
H : ∃! a_1, a_1 ∈ image (fun a => filter (Setoid.r a) univ) univ ∧ a ∈ a_1
w✝ : α
hc : filter (Setoid.r w✝) univ = choose (Membership.mem a) (image (fun a => filter (Setoid.r a) univ) univ) H
this : Setoid.r w✝ a
⊢ Setoid.r w✝ b ↔ Setoid.r a b
state_after: no goals
tactic: exact ⟨s.trans (s.symm this), s.trans this⟩