Theorem: Colex.hom_lt_iff
File: Mathlib/Combinatorics/Colex.lean

tactic: simp only [Colex.lt_def, not_exists, mem_image, exists_prop, not_and]
state_before: α : Type u_2
β : Type u_1
inst✝² : LinearOrder α
inst✝¹ : DecidableEq β
inst✝ : Preorder β
f : α → β
h₁ : StrictMono f
A B : Finset α
⊢ toColex (image f A) < toColex (image f B) ↔ toColex A < toColex B

tactic: constructor
state_before: α : Type u_2
β : Type u_1
inst✝² : LinearOrder α
inst✝¹ : DecidableEq β
inst✝ : Preorder β
f : α → β
h₁ : StrictMono f
A B : Finset α
⊢ (∃ k,
      (∀ {x : β}, k < x → ((∃ a, a ∈ A ∧ f a = x) ↔ ∃ a, a ∈ B ∧ f a = x)) ∧
        (∀ (x : α), x ∈ A → ¬f x = k) ∧ ∃ a, a ∈ B ∧ f a = k) ↔
    ∃ k, (∀ {x : α}, k < x → (x ∈ A ↔ x ∈ B)) ∧ ¬k ∈ A ∧ k ∈ B

tactic: rintro ⟨k, z, ka, _⟩
state_before: case mpr
α : Type u_2
β : Type u_1
inst✝² : LinearOrder α
inst✝¹ : DecidableEq β
inst✝ : Preorder β
f : α → β
h₁ : StrictMono f
A B : Finset α
⊢ (∃ k, (∀ {x : α}, k < x → (x ∈ A ↔ x ∈ B)) ∧ ¬k ∈ A ∧ k ∈ B) →
    ∃ k,
      (∀ {x : β}, k < x → ((∃ a, a ∈ A ∧ f a = x) ↔ ∃ a, a ∈ B ∧ f a = x)) ∧
        (∀ (x : α), x ∈ A → ¬f x = k) ∧ ∃ a, a ∈ B ∧ f a = k

tactic: refine' ⟨f k, @fun x hx => _, _, k, ‹k ∈ B›, rfl⟩
state_before: case mpr.intro.intro.intro
α : Type u_2
β : Type u_1
inst✝² : LinearOrder α
inst✝¹ : DecidableEq β
inst✝ : Preorder β
f : α → β
h₁ : StrictMono f
A B : Finset α
k : α
z : ∀ {x : α}, k < x → (x ∈ A ↔ x ∈ B)
ka : ¬k ∈ A
right✝ : k ∈ B
⊢ ∃ k,
    (∀ {x : β}, k < x → ((∃ a, a ∈ A ∧ f a = x) ↔ ∃ a, a ∈ B ∧ f a = x)) ∧
      (∀ (x : α), x ∈ A → ¬f x = k) ∧ ∃ a, a ∈ B ∧ f a = k

tactic: rintro ⟨k, z, q, k', _, rfl⟩
state_before: case mp
α : Type u_2
β : Type u_1
inst✝² : LinearOrder α
inst✝¹ : DecidableEq β
inst✝ : Preorder β
f : α → β
h₁ : StrictMono f
A B : Finset α
⊢ (∃ k,
      (∀ {x : β}, k < x → ((∃ a, a ∈ A ∧ f a = x) ↔ ∃ a, a ∈ B ∧ f a = x)) ∧
        (∀ (x : α), x ∈ A → ¬f x = k) ∧ ∃ a, a ∈ B ∧ f a = k) →
    ∃ k, (∀ {x : α}, k < x → (x ∈ A ↔ x ∈ B)) ∧ ¬k ∈ A ∧ k ∈ B

tactic: exact
  ⟨k', @fun x hx => by
    simpa [h₁.injective.eq_iff] using z (h₁ hx), fun t => q _ t rfl, ‹k' ∈ B›⟩
state_before: case mp.intro.intro.intro.intro.intro
α : Type u_2
β : Type u_1
inst✝² : LinearOrder α
inst✝¹ : DecidableEq β
inst✝ : Preorder β
f : α → β
h₁ : StrictMono f
A B : Finset α
k' : α
left✝ : k' ∈ B
z : ∀ {x : β}, f k' < x → ((∃ a, a ∈ A ∧ f a = x) ↔ ∃ a, a ∈ B ∧ f a = x)
q : ∀ (x : α), x ∈ A → ¬f x = f k'
⊢ ∃ k, (∀ {x : α}, k < x → (x ∈ A ↔ x ∈ B)) ∧ ¬k ∈ A ∧ k ∈ B

tactic: simpa [h₁.injective.eq_iff] using z (h₁ hx)
state_before: α : Type u_2
β : Type u_1
inst✝² : LinearOrder α
inst✝¹ : DecidableEq β
inst✝ : Preorder β
f : α → β
h₁ : StrictMono f
A B : Finset α
k' : α
left✝ : k' ∈ B
z : ∀ {x : β}, f k' < x → ((∃ a, a ∈ A ∧ f a = x) ↔ ∃ a, a ∈ B ∧ f a = x)
q : ∀ (x : α), x ∈ A → ¬f x = f k'
x : α
hx : k' < x
⊢ x ∈ A ↔ x ∈ B

tactic: constructor
state_before: case mpr.intro.intro.intro.refine'_1
α : Type u_2
β : Type u_1
inst✝² : LinearOrder α
inst✝¹ : DecidableEq β
inst✝ : Preorder β
f : α → β
h₁ : StrictMono f
A B : Finset α
k : α
z : ∀ {x : α}, k < x → (x ∈ A ↔ x ∈ B)
ka : ¬k ∈ A
right✝ : k ∈ B
x : β
hx : f k < x
⊢ (∃ a, a ∈ A ∧ f a = x) ↔ ∃ a, a ∈ B ∧ f a = x

tactic: any_goals
  rintro ⟨x', hx', rfl⟩
  refine' ⟨x', _, rfl⟩
  first |rwa [← z _]|rwa [z _]
  rwa [StrictMono.lt_iff_lt h₁] at hx
state_before: case mpr.intro.intro.intro.refine'_1.mp
α : Type u_2
β : Type u_1
inst✝² : LinearOrder α
inst✝¹ : DecidableEq β
inst✝ : Preorder β
f : α → β
h₁ : StrictMono f
A B : Finset α
k : α
z : ∀ {x : α}, k < x → (x ∈ A ↔ x ∈ B)
ka : ¬k ∈ A
right✝ : k ∈ B
x : β
hx : f k < x
⊢ (∃ a, a ∈ A ∧ f a = x) → ∃ a, a ∈ B ∧ f a = x

case mpr.intro.intro.intro.refine'_1.mpr
α : Type u_2
β : Type u_1
inst✝² : LinearOrder α
inst✝¹ : DecidableEq β
inst✝ : Preorder β
f : α → β
h₁ : StrictMono f
A B : Finset α
k : α
z : ∀ {x : α}, k < x → (x ∈ A ↔ x ∈ B)
ka : ¬k ∈ A
right✝ : k ∈ B
x : β
hx : f k < x
⊢ (∃ a, a ∈ B ∧ f a = x) → ∃ a, a ∈ A ∧ f a = x

tactic: rintro ⟨x', hx', rfl⟩
state_before: case mpr.intro.intro.intro.refine'_1.mpr
α : Type u_2
β : Type u_1
inst✝² : LinearOrder α
inst✝¹ : DecidableEq β
inst✝ : Preorder β
f : α → β
h₁ : StrictMono f
A B : Finset α
k : α
z : ∀ {x : α}, k < x → (x ∈ A ↔ x ∈ B)
ka : ¬k ∈ A
right✝ : k ∈ B
x : β
hx : f k < x
⊢ (∃ a, a ∈ B ∧ f a = x) → ∃ a, a ∈ A ∧ f a = x

tactic: refine' ⟨x', _, rfl⟩
state_before: case mpr.intro.intro.intro.refine'_1.mpr.intro.intro
α : Type u_2
β : Type u_1
inst✝² : LinearOrder α
inst✝¹ : DecidableEq β
inst✝ : Preorder β
f : α → β
h₁ : StrictMono f
A B : Finset α
k : α
z : ∀ {x : α}, k < x → (x ∈ A ↔ x ∈ B)
ka : ¬k ∈ A
right✝ : k ∈ B
x' : α
hx' : x' ∈ B
hx : f k < f x'
⊢ ∃ a, a ∈ A ∧ f a = f x'

tactic: first |rwa [← z _]|rwa [z _]
state_before: case mpr.intro.intro.intro.refine'_1.mpr.intro.intro
α : Type u_2
β : Type u_1
inst✝² : LinearOrder α
inst✝¹ : DecidableEq β
inst✝ : Preorder β
f : α → β
h₁ : StrictMono f
A B : Finset α
k : α
z : ∀ {x : α}, k < x → (x ∈ A ↔ x ∈ B)
ka : ¬k ∈ A
right✝ : k ∈ B
x' : α
hx' : x' ∈ B
hx : f k < f x'
⊢ x' ∈ A

tactic: rwa [StrictMono.lt_iff_lt h₁] at hx
state_before: α : Type u_2
β : Type u_1
inst✝² : LinearOrder α
inst✝¹ : DecidableEq β
inst✝ : Preorder β
f : α → β
h₁ : StrictMono f
A B : Finset α
k : α
z : ∀ {x : α}, k < x → (x ∈ A ↔ x ∈ B)
ka : ¬k ∈ A
right✝ : k ∈ B
x' : α
hx' : x' ∈ B
hx : f k < f x'
⊢ k < x'

tactic: rwa [← z _]
state_before: case mpr.intro.intro.intro.refine'_1.mpr.intro.intro
α : Type u_2
β : Type u_1
inst✝² : LinearOrder α
inst✝¹ : DecidableEq β
inst✝ : Preorder β
f : α → β
h₁ : StrictMono f
A B : Finset α
k : α
z : ∀ {x : α}, k < x → (x ∈ A ↔ x ∈ B)
ka : ¬k ∈ A
right✝ : k ∈ B
x' : α
hx' : x' ∈ B
hx : f k < f x'
⊢ x' ∈ A

tactic: rwa [z _]
state_before: case mpr.intro.intro.intro.refine'_1.mpr.intro.intro
α : Type u_2
β : Type u_1
inst✝² : LinearOrder α
inst✝¹ : DecidableEq β
inst✝ : Preorder β
f : α → β
h₁ : StrictMono f
A B : Finset α
k : α
z : ∀ {x : α}, k < x → (x ∈ A ↔ x ∈ B)
ka : ¬k ∈ A
right✝ : k ∈ B
x' : α
hx' : x' ∈ B
hx : f k < f x'
⊢ x' ∈ A

tactic: simp only [h₁.injective, Function.Injective.eq_iff]
state_before: case mpr.intro.intro.intro.refine'_2
α : Type u_2
β : Type u_1
inst✝² : LinearOrder α
inst✝¹ : DecidableEq β
inst✝ : Preorder β
f : α → β
h₁ : StrictMono f
A B : Finset α
k : α
z : ∀ {x : α}, k < x → (x ∈ A ↔ x ∈ B)
ka : ¬k ∈ A
right✝ : k ∈ B
⊢ ∀ (x : α), x ∈ A → ¬f x = f k

tactic: exact fun x hx => ne_of_mem_of_not_mem hx ka
state_before: case mpr.intro.intro.intro.refine'_2
α : Type u_2
β : Type u_1
inst✝² : LinearOrder α
inst✝¹ : DecidableEq β
inst✝ : Preorder β
f : α → β
h₁ : StrictMono f
A B : Finset α
k : α
z : ∀ {x : α}, k < x → (x ∈ A ↔ x ∈ B)
ka : ¬k ∈ A
right✝ : k ∈ B
⊢ ∀ (x : α), x ∈ A → ¬x = k