Theorem: PartENat.lt_def
File: Mathlib/Data/Nat/PartENat.lean

tactic: rw [lt_iff_le_not_le, le_def, le_def, not_exists]
state_before: x y : PartENat
⊢ x < y ↔ ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy
state_after: x y : PartENat
⊢ ((∃ (h : y.Dom → x.Dom), ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy) ∧
      ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy) ↔
    ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy

tactic: constructor
state_before: x y : PartENat
⊢ ((∃ (h : y.Dom → x.Dom), ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy) ∧
      ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy) ↔
    ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy
state_after: case mp
x y : PartENat
⊢ ((∃ (h : y.Dom → x.Dom), ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy) ∧
      ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy) →
    ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy

case mpr
x y : PartENat
⊢ (∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy) →
    (∃ (h : y.Dom → x.Dom), ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy) ∧
      ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy

tactic: rintro ⟨⟨hyx, H⟩, h⟩
state_before: case mp
x y : PartENat
⊢ ((∃ (h : y.Dom → x.Dom), ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy) ∧
      ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy) →
    ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy
state_after: case mp.intro.intro
x y : PartENat
h : ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy
hyx : y.Dom → x.Dom
H : ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy
⊢ ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy

tactic: by_cases hx : x.Dom
state_before: case mp.intro.intro
x y : PartENat
h : ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy
hyx : y.Dom → x.Dom
H : ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy
⊢ ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy
state_after: case pos
x y : PartENat
h : ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy
hyx : y.Dom → x.Dom
H : ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy
hx : x.Dom
⊢ ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy

case neg
x y : PartENat
h : ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy
hyx : y.Dom → x.Dom
H : ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy
hx : ¬x.Dom
⊢ ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy

tactic: use hx
state_before: case pos
x y : PartENat
h : ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy
hyx : y.Dom → x.Dom
H : ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy
hx : x.Dom
⊢ ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy
state_after: case h
x y : PartENat
h : ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy
hyx : y.Dom → x.Dom
H : ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy
hx : x.Dom
⊢ ∀ (hy : y.Dom), x.get hx < y.get hy

tactic: intro hy
state_before: case h
x y : PartENat
h : ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy
hyx : y.Dom → x.Dom
H : ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy
hx : x.Dom
⊢ ∀ (hy : y.Dom), x.get hx < y.get hy
state_after: case h
x y : PartENat
h : ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy
hyx : y.Dom → x.Dom
H : ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy
hx : x.Dom
hy : y.Dom
⊢ x.get hx < y.get hy

tactic: specialize H hy
state_before: case h
x y : PartENat
h : ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy
hyx : y.Dom → x.Dom
H : ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy
hx : x.Dom
hy : y.Dom
⊢ x.get hx < y.get hy
state_after: case h
x y : PartENat
h : ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy
hyx : y.Dom → x.Dom
hx : x.Dom
hy : y.Dom
H : x.get ⋯ ≤ y.get hy
⊢ x.get hx < y.get hy

tactic: specialize h fun _ => hy
state_before: case h
x y : PartENat
h : ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy
hyx : y.Dom → x.Dom
hx : x.Dom
hy : y.Dom
H : x.get ⋯ ≤ y.get hy
⊢ x.get hx < y.get hy
state_after: case h
x y : PartENat
hyx : y.Dom → x.Dom
hx : x.Dom
hy : y.Dom
H : x.get ⋯ ≤ y.get hy
h : ¬∀ (hy_1 : x.Dom), y.get hy ≤ x.get hy_1
⊢ x.get hx < y.get hy

tactic: rw [not_forall] at h
state_before: case h
x y : PartENat
hyx : y.Dom → x.Dom
hx : x.Dom
hy : y.Dom
H : x.get ⋯ ≤ y.get hy
h : ¬∀ (hy_1 : x.Dom), y.get hy ≤ x.get hy_1
⊢ x.get hx < y.get hy
state_after: case h
x y : PartENat
hyx : y.Dom → x.Dom
hx : x.Dom
hy : y.Dom
H : x.get ⋯ ≤ y.get hy
h : ∃ (x_1 : x.Dom), ¬y.get hy ≤ x.get x_1
⊢ x.get hx < y.get hy

tactic: cases' h with hx' h
state_before: case h
x y : PartENat
hyx : y.Dom → x.Dom
hx : x.Dom
hy : y.Dom
H : x.get ⋯ ≤ y.get hy
h : ∃ (x_1 : x.Dom), ¬y.get hy ≤ x.get x_1
⊢ x.get hx < y.get hy
state_after: case h.intro
x y : PartENat
hyx : y.Dom → x.Dom
hx : x.Dom
hy : y.Dom
H : x.get ⋯ ≤ y.get hy
hx' : x.Dom
h : ¬y.get hy ≤ x.get hx'
⊢ x.get hx < y.get hy

tactic: rw [not_le] at h
state_before: case h.intro
x y : PartENat
hyx : y.Dom → x.Dom
hx : x.Dom
hy : y.Dom
H : x.get ⋯ ≤ y.get hy
hx' : x.Dom
h : ¬y.get hy ≤ x.get hx'
⊢ x.get hx < y.get hy
state_after: case h.intro
x y : PartENat
hyx : y.Dom → x.Dom
hx : x.Dom
hy : y.Dom
H : x.get ⋯ ≤ y.get hy
hx' : x.Dom
h : x.get hx' < y.get hy
⊢ x.get hx < y.get hy

tactic: exact h
state_before: case h.intro
x y : PartENat
hyx : y.Dom → x.Dom
hx : x.Dom
hy : y.Dom
H : x.get ⋯ ≤ y.get hy
hx' : x.Dom
h : x.get hx' < y.get hy
⊢ x.get hx < y.get hy
state_after: no goals

tactic: specialize h fun hx' => (hx hx').elim
state_before: case neg
x y : PartENat
h : ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy
hyx : y.Dom → x.Dom
H : ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy
hx : ¬x.Dom
⊢ ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy
state_after: case neg
x y : PartENat
hyx : y.Dom → x.Dom
H : ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy
hx : ¬x.Dom
h : ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy
⊢ ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy

tactic: rw [not_forall] at h
state_before: case neg
x y : PartENat
hyx : y.Dom → x.Dom
H : ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy
hx : ¬x.Dom
h : ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy
⊢ ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy
state_after: case neg
x y : PartENat
hyx : y.Dom → x.Dom
H : ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy
hx : ¬x.Dom
h : ∃ (x_1 : x.Dom), ¬y.get ⋯ ≤ x.get x_1
⊢ ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy

tactic: cases' h with hx' h
state_before: case neg
x y : PartENat
hyx : y.Dom → x.Dom
H : ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy
hx : ¬x.Dom
h : ∃ (x_1 : x.Dom), ¬y.get ⋯ ≤ x.get x_1
⊢ ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy
state_after: case neg.intro
x y : PartENat
hyx : y.Dom → x.Dom
H : ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy
hx : ¬x.Dom
hx' : x.Dom
h : ¬y.get ⋯ ≤ x.get hx'
⊢ ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy

tactic: exact (hx hx').elim
state_before: case neg.intro
x y : PartENat
hyx : y.Dom → x.Dom
H : ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy
hx : ¬x.Dom
hx' : x.Dom
h : ¬y.get ⋯ ≤ x.get hx'
⊢ ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy
state_after: no goals

tactic: rintro ⟨hx, H⟩
state_before: case mpr
x y : PartENat
⊢ (∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy) →
    (∃ (h : y.Dom → x.Dom), ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy) ∧
      ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy
state_after: case mpr.intro
x y : PartENat
hx : x.Dom
H : ∀ (hy : y.Dom), x.get hx < y.get hy
⊢ (∃ (h : y.Dom → x.Dom), ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy) ∧
    ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy

tactic: exact ⟨⟨fun _ => hx, fun hy => (H hy).le⟩, fun hxy h => not_lt_of_le (h _) (H _)⟩
state_before: case mpr.intro
x y : PartENat
hx : x.Dom
H : ∀ (hy : y.Dom), x.get hx < y.get hy
⊢ (∃ (h : y.Dom → x.Dom), ∀ (hy : y.Dom), x.get ⋯ ≤ y.get hy) ∧
    ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), y.get ⋯ ≤ x.get hy
state_after: no goals