tasksource/leandojo huggingface dataset:
Theorem: Int.fract_eq_zero_or_add_one_sub_ceil
File: Mathlib/Algebra/Order/Floor.lean

tactic: cases' eq_or_ne (fract a) 0 with ha ha
state_before: F : Type ?u.229164
α : Type u_1
β : Type ?u.229170
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a : α
⊢ fract a = 0 ∨ fract a = a + 1 - ↑⌈a⌉

tactic: right
state_before: case inr
F : Type ?u.229164
α : Type u_1
β : Type ?u.229170
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a : α
ha : fract a ≠ 0
⊢ fract a = 0 ∨ fract a = a + 1 - ↑⌈a⌉

tactic: suffices (⌈a⌉ : α) = ⌊a⌋ + 1 by
  rw [this, ← self_sub_fract]
  abel
state_before: case inr.h
F : Type ?u.229164
α : Type u_1
β : Type ?u.229170
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a : α
ha : fract a ≠ 0
⊢ fract a = a + 1 - ↑⌈a⌉

tactic: norm_cast
state_before: case inr.h
F : Type ?u.229164
α : Type u_1
β : Type ?u.229170
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a : α
ha : fract a ≠ 0
⊢ ↑⌈a⌉ = ↑⌊a⌋ + 1

tactic: rw [ceil_eq_iff]
state_before: case inr.h
F : Type ?u.229164
α : Type u_1
β : Type ?u.229170
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a : α
ha : fract a ≠ 0
⊢ ⌈a⌉ = ⌊a⌋ + 1

tactic: refine' ⟨_, _root_.le_of_lt <| by simp⟩
state_before: case inr.h
F : Type ?u.229164
α : Type u_1
β : Type ?u.229170
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a : α
ha : fract a ≠ 0
⊢ ↑(⌊a⌋ + 1) - 1 < a ∧ a ≤ ↑(⌊a⌋ + 1)

tactic: rw [cast_add, cast_one, add_tsub_cancel_right, ← self_sub_fract a, sub_lt_self_iff]
state_before: case inr.h
F : Type ?u.229164
α : Type u_1
β : Type ?u.229170
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a : α
ha : fract a ≠ 0
⊢ ↑(⌊a⌋ + 1) - 1 < a

tactic: exact ha.symm.lt_of_le (fract_nonneg a)
state_before: case inr.h
F : Type ?u.229164
α : Type u_1
β : Type ?u.229170
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a : α
ha : fract a ≠ 0
⊢ 0 < fract a

tactic: exact Or.inl ha
state_before: case inl
F : Type ?u.229164
α : Type u_1
β : Type ?u.229170
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a : α
ha : fract a = 0
⊢ fract a = 0 ∨ fract a = a + 1 - ↑⌈a⌉

tactic: rw [this, ← self_sub_fract]
state_before: F : Type ?u.229164
α : Type u_1
β : Type ?u.229170
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a : α
ha : fract a ≠ 0
this : ↑⌈a⌉ = ↑⌊a⌋ + 1
⊢ fract a = a + 1 - ↑⌈a⌉

tactic: abel
state_before: F : Type ?u.229164
α : Type u_1
β : Type ?u.229170
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a : α
ha : fract a ≠ 0
this : ↑⌈a⌉ = ↑⌊a⌋ + 1
⊢ fract a = a + 1 - (a - fract a + 1)

tactic: simp
state_before: F : Type ?u.229164
α : Type u_1
β : Type ?u.229170
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ a : α
ha : fract a ≠ 0
⊢ a < ↑(⌊a⌋ + 1)
Theorem: SimpleGraph.Colorable.chromaticNumber_le_of_forall_imp
File: Mathlib/Combinatorics/SimpleGraph/Coloring.lean

tactic: apply csInf_le chromaticNumber_bddBelow
state_before: V : Type u
G : SimpleGraph V
α : Type v
C : Coloring G α
V' : Type u_1
G' : SimpleGraph V'
m : ℕ
hc : Colorable G' m
h : ∀ (n : ℕ), Colorable G' n → Colorable G n
⊢ chromaticNumber G ≤ chromaticNumber G'

tactic: apply h
state_before: V : Type u
G : SimpleGraph V
α : Type v
C : Coloring G α
V' : Type u_1
G' : SimpleGraph V'
m : ℕ
hc : Colorable G' m
h : ∀ (n : ℕ), Colorable G' n → Colorable G n
⊢ chromaticNumber G' ∈ {n | Colorable G n}

tactic: apply colorable_chromaticNumber hc
state_before: case a
V : Type u
G : SimpleGraph V
α : Type v
C : Coloring G α
V' : Type u_1
G' : SimpleGraph V'
m : ℕ
hc : Colorable G' m
h : ∀ (n : ℕ), Colorable G' n → Colorable G n
⊢ Colorable G' (chromaticNumber G')
Theorem: Filter.mem_seq_iff
File: Mathlib/Order/Filter/Basic.lean

tactic: simp only [mem_seq_def, seq_subset, exists_prop, iff_self_iff]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.289749
ι : Sort x
f : Filter (α → β)
g : Filter α
s : Set β
⊢ s ∈ seq f g ↔ ∃ u, u ∈ f ∧ ∃ t, t ∈ g ∧ Set.seq u t ⊆ s
Theorem: Multiset.powerset_aux'_perm
File: Mathlib/Data/Multiset/Powerset.lean

tactic: induction' p with a l₁ l₂ p IH a b l l₁ l₂ l₃ _ _ IH₁ IH₂
state_before: α : Type u_1
l₁ l₂ : List α
p : l₁ ~ l₂
⊢ powersetAux' l₁ ~ powersetAux' l₂

tactic: simp
state_before: case nil
α : Type u_1
l₁ l₂ : List α
⊢ powersetAux' [] ~ powersetAux' []

tactic: simp only [powersetAux'_cons]
state_before: case cons
α : Type u_1
l₁✝ l₂✝ : List α
a : α
l₁ l₂ : List α
p : l₁ ~ l₂
IH : powersetAux' l₁ ~ powersetAux' l₂
⊢ powersetAux' (a :: l₁) ~ powersetAux' (a :: l₂)

tactic: exact IH.append (IH.map _)
state_before: case cons
α : Type u_1
l₁✝ l₂✝ : List α
a : α
l₁ l₂ : List α
p : l₁ ~ l₂
IH : powersetAux' l₁ ~ powersetAux' l₂
⊢ powersetAux' l₁ ++ List.map (cons a) (powersetAux' l₁) ~ powersetAux' l₂ ++ List.map (cons a) (powersetAux' l₂)

tactic: simp only [powersetAux'_cons, map_append, List.map_map, append_assoc]
state_before: case swap
α : Type u_1
l₁ l₂ : List α
a b : α
l : List α
⊢ powersetAux' (b :: a :: l) ~ powersetAux' (a :: b :: l)

tactic: apply Perm.append_left
state_before: case swap
α : Type u_1
l₁ l₂ : List α
a b : α
l : List α
⊢ powersetAux' l ++
      (List.map (cons a) (powersetAux' l) ++
        (List.map (cons b) (powersetAux' l) ++ List.map (cons b ∘ cons a) (powersetAux' l))) ~
    powersetAux' l ++
      (List.map (cons b) (powersetAux' l) ++
        (List.map (cons a) (powersetAux' l) ++ List.map (cons a ∘ cons b) (powersetAux' l)))

tactic: rw [← append_assoc, ← append_assoc,
  (by funext s; simp [cons_swap] : cons b ∘ cons a = cons a ∘ cons b)]
state_before: case swap.a
α : Type u_1
l₁ l₂ : List α
a b : α
l : List α
⊢ List.map (cons a) (powersetAux' l) ++
      (List.map (cons b) (powersetAux' l) ++ List.map (cons b ∘ cons a) (powersetAux' l)) ~
    List.map (cons b) (powersetAux' l) ++
      (List.map (cons a) (powersetAux' l) ++ List.map (cons a ∘ cons b) (powersetAux' l))

tactic: exact perm_append_comm.append_right _
state_before: case swap.a
α : Type u_1
l₁ l₂ : List α
a b : α
l : List α
⊢ List.map (cons a) (powersetAux' l) ++ List.map (cons b) (powersetAux' l) ++
      List.map (cons a ∘ cons b) (powersetAux' l) ~
    List.map (cons b) (powersetAux' l) ++ List.map (cons a) (powersetAux' l) ++
      List.map (cons a ∘ cons b) (powersetAux' l)

tactic: funext s
state_before: α : Type u_1
l₁ l₂ : List α
a b : α
l : List α
⊢ cons b ∘ cons a = cons a ∘ cons b

tactic: simp [cons_swap]
state_before: case h
α : Type u_1
l₁ l₂ : List α
a b : α
l : List α
s : Multiset α
⊢ (cons b ∘ cons a) s = (cons a ∘ cons b) s

tactic: exact IH₁.trans IH₂
state_before: case trans
α : Type u_1
l₁✝ l₂✝ l₁ l₂ l₃ : List α
a✝¹ : l₁ ~ l₂
a✝ : l₂ ~ l₃
IH₁ : powersetAux' l₁ ~ powersetAux' l₂
IH₂ : powersetAux' l₂ ~ powersetAux' l₃
⊢ powersetAux' l₁ ~ powersetAux' l₃
Theorem: mul_two
File: Mathlib/Algebra/Ring/Defs.lean

tactic: rw [mul_one]
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : NonAssocSemiring α
n : α
⊢ n * 1 + n * 1 = n + n
Theorem: Finset.eq_singleton_iff_nonempty_unique_mem
File: Mathlib/Data/Finset/Basic.lean

tactic: constructor
state_before: α : Type u_1
β : Type ?u.30920
γ : Type ?u.30923
s✝ : Finset α
a✝ b : α
s : Finset α
a : α
⊢ s = {a} ↔ Finset.Nonempty s ∧ ∀ (x : α), x ∈ s → x = a

tactic: rintro rfl
state_before: case mp
α : Type u_1
β : Type ?u.30920
γ : Type ?u.30923
s✝ : Finset α
a✝ b : α
s : Finset α
a : α
⊢ s = {a} → Finset.Nonempty s ∧ ∀ (x : α), x ∈ s → x = a

tactic: simp
state_before: case mp
α : Type u_1
β : Type ?u.30920
γ : Type ?u.30923
s : Finset α
a✝ b a : α
⊢ Finset.Nonempty {a} ∧ ∀ (x : α), x ∈ {a} → x = a

tactic: rintro ⟨hne, h_uniq⟩
state_before: case mpr
α : Type u_1
β : Type ?u.30920
γ : Type ?u.30923
s✝ : Finset α
a✝ b : α
s : Finset α
a : α
⊢ (Finset.Nonempty s ∧ ∀ (x : α), x ∈ s → x = a) → s = {a}

tactic: rw [eq_singleton_iff_unique_mem]
state_before: case mpr.intro
α : Type u_1
β : Type ?u.30920
γ : Type ?u.30923
s✝ : Finset α
a✝ b : α
s : Finset α
a : α
hne : Finset.Nonempty s
h_uniq : ∀ (x : α), x ∈ s → x = a
⊢ s = {a}

tactic: refine' ⟨_, h_uniq⟩
state_before: case mpr.intro
α : Type u_1
β : Type ?u.30920
γ : Type ?u.30923
s✝ : Finset α
a✝ b : α
s : Finset α
a : α
hne : Finset.Nonempty s
h_uniq : ∀ (x : α), x ∈ s → x = a
⊢ a ∈ s ∧ ∀ (x : α), x ∈ s → x = a

tactic: rw [← h_uniq hne.choose hne.choose_spec]
state_before: case mpr.intro
α : Type u_1
β : Type ?u.30920
γ : Type ?u.30923
s✝ : Finset α
a✝ b : α
s : Finset α
a : α
hne : Finset.Nonempty s
h_uniq : ∀ (x : α), x ∈ s → x = a
⊢ a ∈ s

tactic: exact hne.choose_spec
state_before: case mpr.intro
α : Type u_1
β : Type ?u.30920
γ : Type ?u.30923
s✝ : Finset α
a✝ b : α
s : Finset α
a : α
hne : Finset.Nonempty s
h_uniq : ∀ (x : α), x ∈ s → x = a
⊢ Exists.choose hne ∈ s
Theorem: IsConformalMap.ne_zero
File: Mathlib/Analysis/NormedSpace/ConformalLinearMap.lean

tactic: rintro rfl
state_before: R : Type u_2
M : Type ?u.245254
N : Type u_3
G : Type ?u.245260
M' : Type u_1
inst✝⁹ : NormedField R
inst✝⁸ : SeminormedAddCommGroup M
inst✝⁷ : SeminormedAddCommGroup N
inst✝⁶ : SeminormedAddCommGroup G
inst✝⁵ : NormedSpace R M
inst✝⁴ : NormedSpace R N
inst✝³ : NormedSpace R G
inst✝² : NormedAddCommGroup M'
inst✝¹ : NormedSpace R M'
f : M →L[R] N
g : N →L[R] G
c : R
inst✝ : Nontrivial M'
f' : M' →L[R] N
hf' : IsConformalMap f'
⊢ f' ≠ 0

tactic: rcases exists_ne (0 : M') with ⟨a, ha⟩
state_before: R : Type u_2
M : Type ?u.245254
N : Type u_3
G : Type ?u.245260
M' : Type u_1
inst✝⁹ : NormedField R
inst✝⁸ : SeminormedAddCommGroup M
inst✝⁷ : SeminormedAddCommGroup N
inst✝⁶ : SeminormedAddCommGroup G
inst✝⁵ : NormedSpace R M
inst✝⁴ : NormedSpace R N
inst✝³ : NormedSpace R G
inst✝² : NormedAddCommGroup M'
inst✝¹ : NormedSpace R M'
f : M →L[R] N
g : N →L[R] G
c : R
inst✝ : Nontrivial M'
hf' : IsConformalMap 0
⊢ False

tactic: exact ha (hf'.injective rfl)
state_before: case intro
R : Type u_2
M : Type ?u.245254
N : Type u_3
G : Type ?u.245260
M' : Type u_1
inst✝⁹ : NormedField R
inst✝⁸ : SeminormedAddCommGroup M
inst✝⁷ : SeminormedAddCommGroup N
inst✝⁶ : SeminormedAddCommGroup G
inst✝⁵ : NormedSpace R M
inst✝⁴ : NormedSpace R N
inst✝³ : NormedSpace R G
inst✝² : NormedAddCommGroup M'
inst✝¹ : NormedSpace R M'
f : M →L[R] N
g : N →L[R] G
c : R
inst✝ : Nontrivial M'
hf' : IsConformalMap 0
a : M'
ha : a ≠ 0
⊢ False
Theorem: List.rdropWhile_eq_nil_iff
File: Mathlib/Data/List/Rdrop.lean

tactic: simp [rdropWhile]
state_before: α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rdropWhile p l = [] ↔ ∀ (x : α), x ∈ l → p x = true
Theorem: Subalgebra.bot_eq_top_iff_finrank_eq_one
File: Mathlib/LinearAlgebra/FiniteDimensional.lean

tactic: rw [← finrank_top, ← subalgebra_top_finrank_eq_submodule_top_finrank,
  Subalgebra.finrank_eq_one_iff, eq_comm]
state_before: K : Type u
V : Type v
F : Type u_2
E : Type u_1
inst✝³ : Field F
inst✝² : Ring E
inst✝¹ : Algebra F E
inst✝ : Nontrivial E
⊢ ⊥ = ⊤ ↔ finrank F E = 1
Theorem: EReal.coe_coe_sign
File: Mathlib/Data/Real/EReal.lean

tactic: cases x <;> rfl
state_before: x : SignType
⊢ ↑↑x = ↑x
Theorem: unary_relation_sSup_iff
File: Mathlib/Order/CompleteLattice.lean

tactic: rw [sSup_apply]
state_before: α✝ : Type ?u.195778
β : Type ?u.195781
β₂ : Type ?u.195784
γ : Type ?u.195787
ι : Sort ?u.195790
ι' : Sort ?u.195793
κ : ι → Sort ?u.195798
κ' : ι' → Sort ?u.195803
α : Type u_1
s : Set (α → Prop)
a : α
⊢ sSup s a ↔ ∃ r, r ∈ s ∧ r a

tactic: simp [← eq_iff_iff]
state_before: α✝ : Type ?u.195778
β : Type ?u.195781
β₂ : Type ?u.195784
γ : Type ?u.195787
ι : Sort ?u.195790
ι' : Sort ?u.195793
κ : ι → Sort ?u.195798
κ' : ι' → Sort ?u.195803
α : Type u_1
s : Set (α → Prop)
a : α
⊢ (⨆ (f : ↑s), ↑f a) ↔ ∃ r, r ∈ s ∧ r a
Theorem: PEquiv.bot_trans
File: Mathlib/Data/PEquiv.lean

tactic: ext
state_before: α : Type u
β : Type v
γ : Type w
δ : Type x
f : β ≃. γ
⊢ PEquiv.trans ⊥ f = ⊥

tactic: dsimp [PEquiv.trans]
state_before: case h.a
α : Type u
β : Type v
γ : Type w
δ : Type x
f : β ≃. γ
x✝ : α
a✝ : γ
⊢ a✝ ∈ ↑(PEquiv.trans ⊥ f) x✝ ↔ a✝ ∈ ↑⊥ x✝

tactic: simp
state_before: case h.a
α : Type u
β : Type v
γ : Type w
δ : Type x
f : β ≃. γ
x✝ : α
a✝ : γ
⊢ a✝ ∈ none ↔ a✝ ∈ none
Theorem: AffineBasis.exists_affine_subbasis
File: Mathlib/LinearAlgebra/AffineSpace/Basis.lean

tactic: obtain ⟨s, hst, h_tot, h_ind⟩ := exists_affineIndependent k V t
state_before: ι : Type ?u.183706
ι' : Type ?u.183709
k : Type u_2
V : Type u_3
P : Type u_1
inst✝³ : AddCommGroup V
inst✝² : AffineSpace V P
inst✝¹ : DivisionRing k
inst✝ : Module k V
t : Set P
ht : affineSpan k t = ⊤
⊢ ∃ s x b, ↑b = Subtype.val

tactic: refine' ⟨s, hst, ⟨(↑), h_ind, _⟩, rfl⟩
state_before: case intro.intro.intro
ι : Type ?u.183706
ι' : Type ?u.183709
k : Type u_2
V : Type u_3
P : Type u_1
inst✝³ : AddCommGroup V
inst✝² : AffineSpace V P
inst✝¹ : DivisionRing k
inst✝ : Module k V
t : Set P
ht : affineSpan k t = ⊤
s : Set P
hst : s ⊆ t
h_tot : affineSpan k s = affineSpan k t
h_ind : AffineIndependent k Subtype.val
⊢ ∃ s x b, ↑b = Subtype.val

tactic: rw [Subtype.range_coe, h_tot, ht]
state_before: case intro.intro.intro
ι : Type ?u.183706
ι' : Type ?u.183709
k : Type u_2
V : Type u_3
P : Type u_1
inst✝³ : AddCommGroup V
inst✝² : AffineSpace V P
inst✝¹ : DivisionRing k
inst✝ : Module k V
t : Set P
ht : affineSpan k t = ⊤
s : Set P
hst : s ⊆ t
h_tot : affineSpan k s = affineSpan k t
h_ind : AffineIndependent k Subtype.val
⊢ affineSpan k (range Subtype.val) = ⊤
Theorem: Nat.pred_mul_geom_sum_le
File: Mathlib/Algebra/GeomSum.lean

tactic: rw [tsub_mul, mul_comm, sum_mul, one_mul, sum_range_succ', sum_range_succ, pow_zero,
Nat.div_one]
state_before: α : Type u
β : Type ?u.218631
a b n : ℕ
⊢ (b - 1) * ∑ i in range (succ n), a / b ^ i =
    ∑ i in range n, a / b ^ (i + 1) * b + a * b - (∑ i in range n, a / b ^ i + a / b ^ n)

tactic: refine' tsub_le_tsub_right (add_le_add_right (sum_le_sum fun i _ => _) _) _
state_before: α : Type u
β : Type ?u.218631
a b n : ℕ
⊢ ∑ i in range n, a / b ^ (i + 1) * b + a * b - (∑ i in range n, a / b ^ i + a / b ^ n) ≤
    ∑ i in range n, a / b ^ i + a * b - (∑ i in range n, a / b ^ i + a / b ^ n)

tactic: rw [pow_succ', mul_comm b]
state_before: α : Type u
β : Type ?u.218631
a b n i : ℕ
x✝ : i ∈ range n
⊢ a / b ^ (i + 1) * b ≤ a / b ^ i

tactic: rw [← Nat.div_div_eq_div_mul]
state_before: α : Type u
β : Type ?u.218631
a b n i : ℕ
x✝ : i ∈ range n
⊢ a / (b ^ i * b) * b ≤ a / b ^ i

tactic: exact Nat.div_mul_le_self _ _
state_before: α : Type u
β : Type ?u.218631
a b n i : ℕ
x✝ : i ∈ range n
⊢ a / b ^ i / b * b ≤ a / b ^ i
Theorem: Std.RBSet.ModifyWF.of_eq
File: Std/Data/RBMap/Alter.lean

tactic: refine ⟨.modify ?_ t.2⟩
state_before: α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
f : α → α
t : RBSet α cmp
H : ∀ {x : α}, RBNode.find? cut t.val = some x → cmpEq cmp (f x) x
⊢ ModifyWF t cut f

tactic: revert H
state_before: α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
f : α → α
t : RBSet α cmp
H : ∀ {x : α}, RBNode.find? cut t.val = some x → cmpEq cmp (f x) x
⊢ OnRoot (fun x => cmpEq cmp (f x) x) (zoom cut t.val Path.root).fst

tactic: rw [find?_eq_zoom]
state_before: α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
f : α → α
t : RBSet α cmp
⊢ (∀ {x : α}, RBNode.find? cut t.val = some x → cmpEq cmp (f x) x) →
    OnRoot (fun x => cmpEq cmp (f x) x) (zoom cut t.val Path.root).fst

tactic: cases (t.1.zoom cut).1 <;> intro H <;> [trivial; exact H rfl]
state_before: α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
f : α → α
t : RBSet α cmp
⊢ (∀ {x : α}, root? (zoom cut t.val Path.root).fst = some x → cmpEq cmp (f x) x) →
    OnRoot (fun x => cmpEq cmp (f x) x) (zoom cut t.val Path.root).fst
Theorem: EMetric.hausdorffEdist_closure₂
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: simp [@hausdorffEdist_comm _ _ s _]
state_before: ι : Sort ?u.53920
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t u : Set α
Φ : α → β
⊢ hausdorffEdist s (closure t) = hausdorffEdist s t
Theorem: List.Subperm.exists_of_length_lt
File: Mathlib/Data/List/Perm.lean

tactic: suffices length l < length l₂ → ∃ a : α, a :: l <+~ l₂ from
  (this <| p.symm.length_eq ▸ h).imp fun a => (p.cons a).subperm_right.1
state_before: α : Type uu
β : Type vv
l₁✝ l₂✝ l₁ l₂ l : List α
p : l ~ l₁
s : l <+ l₂
h : length l₁ < length l₂
⊢ ∃ a, a :: l₁ <+~ l₂

tactic: clear h p l₁
state_before: α : Type uu
β : Type vv
l₁✝ l₂✝ l₁ l₂ l : List α
p : l ~ l₁
s : l <+ l₂
h : length l₁ < length l₂
⊢ length l < length l₂ → ∃ a, a :: l <+~ l₂

tactic: induction' s with l₁ l₂ a s IH _ _ b _ IH <;> intro h
state_before: α : Type uu
β : Type vv
l₁ l₂✝ l₂ l : List α
s : l <+ l₂
⊢ length l < length l₂ → ∃ a, a :: l <+~ l₂

tactic: cases h
state_before: case slnil
α : Type uu
β : Type vv
l₁ l₂✝ l₂ l : List α
h : length [] < length []
⊢ ∃ a, [a] <+~ []

tactic: cases' lt_or_eq_of_le (Nat.le_of_lt_succ h : length l₁ ≤ length l₂) with h h
state_before: case cons
α : Type uu
β : Type vv
l₁✝ l₂✝¹ l₂✝ l l₁ l₂ : List α
a : α
s : l₁ <+ l₂
IH : length l₁ < length l₂ → ∃ a, a :: l₁ <+~ l₂
h : length l₁ < length (a :: l₂)
⊢ ∃ a_1, a_1 :: l₁ <+~ a :: l₂

tactic: exact (IH h).imp fun a s => s.trans (sublist_cons _ _).subperm
state_before: case cons.inl
α : Type uu
β : Type vv
l₁✝ l₂✝¹ l₂✝ l l₁ l₂ : List α
a : α
s : l₁ <+ l₂
IH : length l₁ < length l₂ → ∃ a, a :: l₁ <+~ l₂
h✝ : length l₁ < length (a :: l₂)
h : length l₁ < length l₂
⊢ ∃ a_1, a_1 :: l₁ <+~ a :: l₂

tactic: exact ⟨a, s.eq_of_length h ▸ Subperm.refl _⟩
state_before: case cons.inr
α : Type uu
β : Type vv
l₁✝ l₂✝¹ l₂✝ l l₁ l₂ : List α
a : α
s : l₁ <+ l₂
IH : length l₁ < length l₂ → ∃ a, a :: l₁ <+~ l₂
h✝ : length l₁ < length (a :: l₂)
h : length l₁ = length l₂
⊢ ∃ a_1, a_1 :: l₁ <+~ a :: l₂

tactic: exact (IH <| Nat.lt_of_succ_lt_succ h).imp fun a s =>
    (swap _ _ _).subperm_right.1 <| (subperm_cons _).2 s
state_before: case cons₂
α : Type uu
β : Type vv
l₁ l₂✝¹ l₂ l l₁✝ l₂✝ : List α
b : α
a✝ : l₁✝ <+ l₂✝
IH : length l₁✝ < length l₂✝ → ∃ a, a :: l₁✝ <+~ l₂✝
h : length (b :: l₁✝) < length (b :: l₂✝)
⊢ ∃ a, a :: b :: l₁✝ <+~ b :: l₂✝
Theorem: Submodule.apply_mem_span_image_of_mem_span
File: Mathlib/LinearAlgebra/Span.lean

tactic: rw [Submodule.span_image]
state_before: R : Type u_1
R₂ : Type u_2
K : Type ?u.203558
M : Type u_3
M₂ : Type u_4
V : Type ?u.203567
S : Type ?u.203570
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
x✝ : M
p p' : Submodule R M
inst✝³ : Semiring R₂
σ₁₂ : R →+* R₂
inst✝² : AddCommMonoid M₂
inst✝¹ : Module R₂ M₂
s✝ t : Set M
inst✝ : RingHomSurjective σ₁₂
f : M →ₛₗ[σ₁₂] M₂
x : M
s : Set M
h : x ∈ span R s
⊢ ↑f x ∈ span R₂ (↑f '' s)

tactic: exact Submodule.mem_map_of_mem h
state_before: R : Type u_1
R₂ : Type u_2
K : Type ?u.203558
M : Type u_3
M₂ : Type u_4
V : Type ?u.203567
S : Type ?u.203570
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
x✝ : M
p p' : Submodule R M
inst✝³ : Semiring R₂
σ₁₂ : R →+* R₂
inst✝² : AddCommMonoid M₂
inst✝¹ : Module R₂ M₂
s✝ t : Set M
inst✝ : RingHomSurjective σ₁₂
f : M →ₛₗ[σ₁₂] M₂
x : M
s : Set M
h : x ∈ span R s
⊢ ↑f x ∈ map f (span R s)
Theorem: quadratic_eq_zero_iff_discrim_eq_sq
File: Mathlib/Algebra/QuadraticDiscriminant.lean

tactic: refine ⟨discrim_eq_sq_of_quadratic_eq_zero, fun h ↦ ?_⟩
state_before: R : Type u_1
inst✝² : CommRing R
a b c : R
inst✝¹ : NeZero 2
inst✝ : NoZeroDivisors R
ha : a ≠ 0
x : R
⊢ a * x * x + b * x + c = 0 ↔ discrim a b c = (2 * a * x + b) ^ 2

tactic: rw [discrim] at h
state_before: R : Type u_1
inst✝² : CommRing R
a b c : R
inst✝¹ : NeZero 2
inst✝ : NoZeroDivisors R
ha : a ≠ 0
x : R
h : discrim a b c = (2 * a * x + b) ^ 2
⊢ a * x * x + b * x + c = 0

tactic: have ha : 2 * 2 * a ≠ 0 := mul_ne_zero (mul_ne_zero (NeZero.ne _) (NeZero.ne _)) ha
state_before: R : Type u_1
inst✝² : CommRing R
a b c : R
inst✝¹ : NeZero 2
inst✝ : NoZeroDivisors R
ha : a ≠ 0
x : R
h : b ^ 2 - 4 * a * c = (2 * a * x + b) ^ 2
⊢ a * x * x + b * x + c = 0

tactic: apply mul_left_cancel₀ ha
state_before: R : Type u_1
inst✝² : CommRing R
a b c : R
inst✝¹ : NeZero 2
inst✝ : NoZeroDivisors R
ha✝ : a ≠ 0
x : R
h : b ^ 2 - 4 * a * c = (2 * a * x + b) ^ 2
ha : 2 * 2 * a ≠ 0
⊢ a * x * x + b * x + c = 0

tactic: linear_combination -h
state_before: R : Type u_1
inst✝² : CommRing R
a b c : R
inst✝¹ : NeZero 2
inst✝ : NoZeroDivisors R
ha✝ : a ≠ 0
x : R
h : b ^ 2 - 4 * a * c = (2 * a * x + b) ^ 2
ha : 2 * 2 * a ≠ 0
⊢ 2 * 2 * a * (a * x * x + b * x + c) = 2 * 2 * a * 0
Theorem: List.forall_mem_map_iff
File: Std/Data/List/Lemmas.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
f : α → β
l : List α
P : β → Prop
⊢ (∀ (i : β), i ∈ map f l → P i) ↔ ∀ (j : α), j ∈ l → P (f j)

tactic: exact ⟨fun H j h => H _ _ h rfl, fun H i x h e => e ▸ H _ h⟩
state_before: α : Type u_1
β : Type u_2
f : α → β
l : List α
P : β → Prop
⊢ (∀ (i : β) (x : α), x ∈ l → f x = i → P i) ↔ ∀ (j : α), j ∈ l → P (f j)
Theorem: EuclideanDomain.mul_div_cancel
File: Mathlib/Algebra/EuclideanDomain/Basic.lean

tactic: rw [mul_comm]
state_before: R : Type u
inst✝ : EuclideanDomain R
a b : R
b0 : b ≠ 0
⊢ a * b / b = a

tactic: exact mul_div_cancel_left a b0
state_before: R : Type u
inst✝ : EuclideanDomain R
a b : R
b0 : b ≠ 0
⊢ b * a / b = a
Theorem: Polynomial.mem_lift_of_splits_of_roots_mem_range
File: Mathlib/Data/Polynomial/Splits.lean

tactic: rw [eq_prod_roots_of_monic_of_splits_id hm hs, lifts_iff_liftsRing]
state_before: F : Type u
K : Type v
L : Type w
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field F
i : K →+* L
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Algebra R K
f : K[X]
hs : Splits (RingHom.id K) f
hm : Monic f
hr : ∀ (a : K), a ∈ roots f → a ∈ RingHom.range (algebraMap R K)
⊢ f ∈ lifts (algebraMap R K)

tactic: refine' Subring.multiset_prod_mem _ _ fun P hP => _
state_before: F : Type u
K : Type v
L : Type w
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field F
i : K →+* L
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Algebra R K
f : K[X]
hs : Splits (RingHom.id K) f
hm : Monic f
hr : ∀ (a : K), a ∈ roots f → a ∈ RingHom.range (algebraMap R K)
⊢ Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots f)) ∈ liftsRing (algebraMap R K)

tactic: obtain ⟨b, hb, rfl⟩ := Multiset.mem_map.1 hP
state_before: F : Type u
K : Type v
L : Type w
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field F
i : K →+* L
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Algebra R K
f : K[X]
hs : Splits (RingHom.id K) f
hm : Monic f
hr : ∀ (a : K), a ∈ roots f → a ∈ RingHom.range (algebraMap R K)
P : K[X]
hP : P ∈ Multiset.map (fun a => X - ↑C a) (roots f)
⊢ P ∈ liftsRing (algebraMap R K)

tactic: exact Subring.sub_mem _ (X_mem_lifts _) (C'_mem_lifts (hr _ hb))
state_before: case intro.intro
F : Type u
K : Type v
L : Type w
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field F
i : K →+* L
R : Type u_1
inst✝¹ : CommRing R
inst✝ : Algebra R K
f : K[X]
hs : Splits (RingHom.id K) f
hm : Monic f
hr : ∀ (a : K), a ∈ roots f → a ∈ RingHom.range (algebraMap R K)
b : K
hb : b ∈ roots f
hP : X - ↑C b ∈ Multiset.map (fun a => X - ↑C a) (roots f)
⊢ X - ↑C b ∈ liftsRing (algebraMap R K)
Theorem: MeasurableSpace.self_subset_generateMeasurableRec
File: Mathlib/MeasureTheory/CardMeasurableSpace.lean

tactic: unfold generateMeasurableRec
state_before: α : Type u
s : Set (Set α)
i : (Quotient.out (ord (aleph 1))).α
⊢ s ⊆ generateMeasurableRec s i

tactic: apply_rules [subset_union_of_subset_left]
state_before: α : Type u
s : Set (Set α)
i : (Quotient.out (ord (aleph 1))).α
⊢ s ⊆
    let i := i;
    let S := ⋃ (j : ↑(Iio i)), generateMeasurableRec s ↑j;
    s ∪ {∅} ∪ compl '' S ∪ range fun f => ⋃ (n : ℕ), ↑(f n)

tactic: exact subset_rfl
state_before: case h.h.h
α : Type u
s : Set (Set α)
i : (Quotient.out (ord (aleph 1))).α
⊢ s ⊆ s
Theorem: CompleteLattice.Independent.subtype_ne_bot_le_finrank
File: Mathlib/LinearAlgebra/FiniteDimensional.lean

tactic: simpa using hp.subtype_ne_bot_le_finrank_aux
state_before: K : Type u
V : Type v
inst✝⁶ : DivisionRing K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
V₂ : Type v'
inst✝³ : AddCommGroup V₂
inst✝² : Module K V₂
inst✝¹ : FiniteDimensional K V
ι : Type w
p : ι → Submodule K V
hp : CompleteLattice.Independent p
inst✝ : Fintype { i // p i ≠ ⊥ }
⊢ Fintype.card { i // p i ≠ ⊥ } ≤ finrank K V
Theorem: Urysohns.CU.lim_of_mem_C
File: Mathlib/Topology/UrysohnsLemma.lean

tactic: simp only [CU.lim, approx_of_mem_C, h, ciSup_const]
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
c : CU X
x : X
h : x ∈ c.C
⊢ CU.lim c x = 0