tasksource/leandojo huggingface dataset:
Theorem: card_derangements_fin_add_two
File: Mathlib/Combinatorics/Derangements/Finite.lean

tactic: have h1 : ∀ a : Fin (n + 1), card ({a}ᶜ : Set (Fin (n + 1))) = card (Fin n) := by
  intro a
  simp only [Fintype.card_fin, Finset.card_fin, Fintype.card_ofFinset, Finset.filter_ne' _ a,
    Set.mem_compl_singleton_iff, Finset.card_erase_of_mem (Finset.mem_univ a),
    add_tsub_cancel_right]
state_before: α : Type ?u.2521
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
⊢ card ↑(derangements (Fin (n + 2))) =
    (n + 1) * card ↑(derangements (Fin n)) + (n + 1) * card ↑(derangements (Fin (n + 1)))

tactic: have h2 : card (Fin (n + 2)) = card (Option (Fin (n + 1))) := by simp only [card_fin, card_option]
state_before: α : Type ?u.2521
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h1 : ∀ (a : Fin (n + 1)), card ↑({a}ᶜ) = card (Fin n)
⊢ card ↑(derangements (Fin (n + 2))) =
    (n + 1) * card ↑(derangements (Fin n)) + (n + 1) * card ↑(derangements (Fin (n + 1)))

tactic: simp only [card_derangements_invariant h2,
  card_congr
    (@derangementsRecursionEquiv (Fin (n + 1))
      _),card_sigma,
  card_sum, card_derangements_invariant (h1 _), Finset.sum_const, nsmul_eq_mul, Finset.card_fin,
  mul_add, Nat.cast_id]
state_before: α : Type ?u.2521
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h1 : ∀ (a : Fin (n + 1)), card ↑({a}ᶜ) = card (Fin n)
h2 : card (Fin (n + 2)) = card (Option (Fin (n + 1)))
⊢ card ↑(derangements (Fin (n + 2))) =
    (n + 1) * card ↑(derangements (Fin n)) + (n + 1) * card ↑(derangements (Fin (n + 1)))

tactic: intro a
state_before: α : Type ?u.2521
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
⊢ ∀ (a : Fin (n + 1)), card ↑({a}ᶜ) = card (Fin n)

tactic: simp only [Fintype.card_fin, Finset.card_fin, Fintype.card_ofFinset, Finset.filter_ne' _ a,
  Set.mem_compl_singleton_iff, Finset.card_erase_of_mem (Finset.mem_univ a),
  add_tsub_cancel_right]
state_before: α : Type ?u.2521
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
a : Fin (n + 1)
⊢ card ↑({a}ᶜ) = card (Fin n)

tactic: simp only [card_fin, card_option]
state_before: α : Type ?u.2521
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h1 : ∀ (a : Fin (n + 1)), card ↑({a}ᶜ) = card (Fin n)
⊢ card (Fin (n + 2)) = card (Option (Fin (n + 1)))
Theorem: ENat.add_one_le_iff
File: Mathlib/Data/ENat/Basic.lean

tactic: rwa [isMax_iff_eq_top]
state_before: m n : ℕ∞
hm : m ≠ ⊤
⊢ ¬IsMax m
Theorem: SimpleGraph.Walk.edges_append
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: simp [edges]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w : V
p : Walk G u v
p' : Walk G v w
⊢ edges (append p p') = edges p ++ edges p'
Theorem: MeasureTheory.Lp.nnnorm_zero
File: Mathlib/MeasureTheory/Function/LpSpace.lean

tactic: rw [nnnorm_def]
state_before: α : Type u_1
E : Type u_2
F : Type ?u.407281
G : Type ?u.407284
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
⊢ ‖0‖₊ = 0

tactic: change (snorm (⇑(0 : α →ₘ[μ] E)) p μ).toNNReal = 0
state_before: α : Type u_1
E : Type u_2
F : Type ?u.407281
G : Type ?u.407284
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
⊢ ENNReal.toNNReal (snorm (↑↑0) p μ) = 0

tactic: simp [snorm_congr_ae AEEqFun.coeFn_zero, snorm_zero]
state_before: α : Type u_1
E : Type u_2
F : Type ?u.407281
G : Type ?u.407284
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
⊢ ENNReal.toNNReal (snorm (↑0) p μ) = 0
Theorem: CircleDeg1Lift.iterate_eq_of_map_eq_add_int
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

tactic: simpa only [nsmul_eq_mul, add_right_iterate] using (f.commute_add_int m).iterate_eq_of_map_eq n h
state_before: f g : CircleDeg1Lift
x : ℝ
m : ℤ
h : ↑f x = x + ↑m
n : ℕ
⊢ (↑f^[n]) x = x + ↑n * ↑m
Theorem: uniformity_eq_comap_nhds_one_swapped
File: Mathlib/Topology/Algebra/UniformGroup.lean

tactic: rw [← comap_swap_uniformity, uniformity_eq_comap_nhds_one, comap_comap]
state_before: α : Type u_1
β : Type ?u.164871
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
⊢ 𝓤 α = comap (fun x => x.fst / x.snd) (𝓝 1)

tactic: rfl
state_before: α : Type u_1
β : Type ?u.164871
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
⊢ comap ((fun x => x.snd / x.fst) ∘ Prod.swap) (𝓝 1) = comap (fun x => x.fst / x.snd) (𝓝 1)
Theorem: IntermediateField.coe_prod
File: Mathlib/FieldTheory/IntermediateField.lean

tactic: induction' (Finset.univ : Finset ι) using Finset.induction_on with i s hi H
state_before: K : Type u_3
L : Type u_2
L' : Type ?u.112045
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Field L'
inst✝² : Algebra K L
inst✝¹ : Algebra K L'
S : IntermediateField K L
ι : Type u_1
inst✝ : Fintype ι
f : ι → { x // x ∈ S }
⊢ ↑(∏ i : ι, f i) = ∏ i : ι, ↑(f i)

tactic: simp
state_before: case empty
K : Type u_3
L : Type u_2
L' : Type ?u.112045
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Field L'
inst✝² : Algebra K L
inst✝¹ : Algebra K L'
S : IntermediateField K L
ι : Type u_1
inst✝ : Fintype ι
f : ι → { x // x ∈ S }
⊢ ↑(∏ i in ∅, f i) = ∏ i in ∅, ↑(f i)

tactic: rw [Finset.prod_insert hi, MulMemClass.coe_mul, H, Finset.prod_insert hi]
state_before: case insert
K : Type u_3
L : Type u_2
L' : Type ?u.112045
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : Field L'
inst✝² : Algebra K L
inst✝¹ : Algebra K L'
S : IntermediateField K L
ι : Type u_1
inst✝ : Fintype ι
f : ι → { x // x ∈ S }
i : ι
s : Finset ι
hi : ¬i ∈ s
H : ↑(∏ i in s, f i) = ∏ i in s, ↑(f i)
⊢ ↑(∏ i in insert i s, f i) = ∏ i in insert i s, ↑(f i)
Theorem: Polynomial.degree_add_eq_right_of_degree_lt
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: rw [add_comm, degree_add_eq_left_of_degree_lt h]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.530544
h : degree p < degree q
⊢ degree (p + q) = degree q
Theorem: List.Func.get_pointwise
File: Mathlib/Data/List/Func.lean

tactic: simp only [h1, get_nil, pointwise, get]
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : Inhabited α
inst✝¹ : Inhabited β
inst✝ : Inhabited γ
f : α → β → γ
h1 : f default default = default
k : ℕ
⊢ get k (pointwise f [] []) = f (get k []) (get k [])

tactic: simp only [get_pointwise, get_nil, pointwise, get, Nat.zero_eq, map]
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : Inhabited α
inst✝¹ : Inhabited β
inst✝ : Inhabited γ
f : α → β → γ
h1 : f default default = default
b : β
tail✝ : List β
⊢ get 0 (pointwise f [] (b :: tail✝)) = f (get 0 []) (get 0 (b :: tail✝))

tactic: have : get k (map (f default) bs) = f default (get k bs) := by
  simpa [nil_pointwise, get_nil] using get_pointwise h1 k [] bs
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : Inhabited α
inst✝¹ : Inhabited β
inst✝ : Inhabited γ
f : α → β → γ
h1 : f default default = default
k : ℕ
b : β
bs : List β
⊢ get (k + 1) (pointwise f [] (b :: bs)) = f (get (k + 1) []) (get (k + 1) (b :: bs))

tactic: simpa [get, get_nil, pointwise, map]
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : Inhabited α
inst✝¹ : Inhabited β
inst✝ : Inhabited γ
f : α → β → γ
h1 : f default default = default
k : ℕ
b : β
bs : List β
this : get k (map (f default) bs) = f default (get k bs)
⊢ get (k + 1) (pointwise f [] (b :: bs)) = f (get (k + 1) []) (get (k + 1) (b :: bs))

tactic: simpa [nil_pointwise, get_nil] using get_pointwise h1 k [] bs
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : Inhabited α
inst✝¹ : Inhabited β
inst✝ : Inhabited γ
f : α → β → γ
h1 : f default default = default
k : ℕ
b : β
bs : List β
⊢ get k (map (f default) bs) = f default (get k bs)

tactic: simp only [get_pointwise, get_nil, pointwise, get, Nat.zero_eq, map]
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : Inhabited α
inst✝¹ : Inhabited β
inst✝ : Inhabited γ
f : α → β → γ
h1 : f default default = default
a : α
tail✝ : List α
⊢ get 0 (pointwise f (a :: tail✝) []) = f (get 0 (a :: tail✝)) (get 0 [])

tactic: simpa [get, get_nil, pointwise, map, pointwise_nil, get_nil] using get_pointwise h1 k as []
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : Inhabited α
inst✝¹ : Inhabited β
inst✝ : Inhabited γ
f : α → β → γ
h1 : f default default = default
k : ℕ
a : α
as : List α
⊢ get (k + 1) (pointwise f (a :: as) []) = f (get (k + 1) (a :: as)) (get (k + 1) [])

tactic: simp only [pointwise, get]
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : Inhabited α
inst✝¹ : Inhabited β
inst✝ : Inhabited γ
f : α → β → γ
h1 : f default default = default
a : α
tail✝¹ : List α
b : β
tail✝ : List β
⊢ get 0 (pointwise f (a :: tail✝¹) (b :: tail✝)) = f (get 0 (a :: tail✝¹)) (get 0 (b :: tail✝))

tactic: simp only [get, Nat.add_eq, add_zero, get_pointwise h1 k as bs]
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : Inhabited α
inst✝¹ : Inhabited β
inst✝ : Inhabited γ
f : α → β → γ
h1 : f default default = default
k : ℕ
head✝¹ : α
as : List α
head✝ : β
bs : List β
⊢ get (k + 1) (pointwise f (head✝¹ :: as) (head✝ :: bs)) = f (get (k + 1) (head✝¹ :: as)) (get (k + 1) (head✝ :: bs))
Theorem: Polynomial.leadingCoeff_C_mul_X
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: simpa only [pow_one] using leadingCoeff_C_mul_X_pow a 1
state_before: R : Type u
S : Type v
a✝ b c d : R
n m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.618012
a : R
⊢ leadingCoeff (↑C a * X) = a
Theorem: div_ball
File: Mathlib/Analysis/Normed/Group/Pointwise.lean

tactic: simp [div_eq_mul_inv]
state_before: E : Type u_1
inst✝ : SeminormedCommGroup E
ε δ : ℝ
s t : Set E
x y : E
⊢ s / ball x δ = x⁻¹ • thickening δ s
Theorem: Sym2.Rel.symm
File: Mathlib/Data/Sym/Sym2.lean

tactic: aesop (rule_sets [Sym2])
state_before: α : Type u_1
β : Type ?u.124
γ : Type ?u.127
x y : α × α
⊢ Rel α x y → Rel α y x
Theorem: OmegaCompletePartialOrder.ωSup_le_ωSup_of_le
File: Mathlib/Order/OmegaCompletePartialOrder.lean

tactic: obtain ⟨_, h⟩ := h i
state_before: α : Type u
β : Type v
γ : Type ?u.8099
inst✝ : OmegaCompletePartialOrder α
c₀ c₁ : Chain α
h : c₀ ≤ c₁
i : ℕ
⊢ ↑c₀ i ≤ ωSup c₁

tactic: exact le_trans h (le_ωSup _ _)
state_before: case intro
α : Type u
β : Type v
γ : Type ?u.8099
inst✝ : OmegaCompletePartialOrder α
c₀ c₁ : Chain α
h✝ : c₀ ≤ c₁
i w✝ : ℕ
h : ↑c₀ i ≤ ↑c₁ w✝
⊢ ↑c₀ i ≤ ωSup c₁
Theorem: PosNum.le_to_nat
File: Mathlib/Data/Num/Lemmas.lean

tactic: rw [← not_lt]
state_before: α : Type ?u.168918
m n : PosNum
⊢ ↑m ≤ ↑n ↔ m ≤ n

tactic: exact not_congr lt_to_nat
state_before: α : Type ?u.168918
m n : PosNum
⊢ ¬↑n < ↑m ↔ m ≤ n
Theorem: AddSubmonoid.mul_bot
File: Mathlib/GroupTheory/Submonoid/Pointwise.lean

tactic: rw [AddSubmonoid.mem_bot] at hn ⊢
state_before: α : Type ?u.249186
G : Type ?u.249189
M : Type ?u.249192
R : Type u_1
A : Type ?u.249198
inst✝² : Monoid M
inst✝¹ : AddMonoid A
inst✝ : NonUnitalNonAssocSemiring R
S : AddSubmonoid R
m : R
x✝ : m ∈ S
n : R
hn : n ∈ ⊥
⊢ m * n ∈ ⊥

tactic: rw [hn, mul_zero]
state_before: α : Type ?u.249186
G : Type ?u.249189
M : Type ?u.249192
R : Type u_1
A : Type ?u.249198
inst✝² : Monoid M
inst✝¹ : AddMonoid A
inst✝ : NonUnitalNonAssocSemiring R
S : AddSubmonoid R
m : R
x✝ : m ∈ S
n : R
hn : n = 0
⊢ m * n = 0
Theorem: Polynomial.C_mul_monomial
File: Mathlib/Data/Polynomial/Basic.lean

tactic: simp only [← monomial_zero_left, monomial_mul_monomial, zero_add]
state_before: R : Type u
a b : R
m n : ℕ
inst✝ : Semiring R
p q : R[X]
⊢ ↑C a * ↑(monomial n) b = ↑(monomial n) (a * b)
Theorem: smul_closedBall'
File: Mathlib/Analysis/NormedSpace/Pointwise.lean

tactic: simp only [← ball_union_sphere, Set.smul_set_union, _root_.smul_ball hc, smul_sphere' hc]
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝² : NormedField 𝕜
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
c : 𝕜
hc : c ≠ 0
x : E
r : ℝ
⊢ c • closedBall x r = closedBall (c • x) (‖c‖ * r)
Theorem: Matrix.diagonal_injective
File: Mathlib/Data/Matrix/Basic.lean

tactic: simpa using Matrix.ext_iff.mpr h i i
state_before: l : Type ?u.47215
m : Type ?u.47218
n : Type u_1
o : Type ?u.47224
m' : o → Type ?u.47229
n' : o → Type ?u.47234
R : Type ?u.47237
S : Type ?u.47240
α : Type v
β : Type w
γ : Type ?u.47247
inst✝¹ : DecidableEq n
inst✝ : Zero α
d₁ d₂ : n → α
h : diagonal d₁ = diagonal d₂
i : n
⊢ d₁ i = d₂ i
Theorem: Zsqrtd.smul_re
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

tactic: simp
state_before: d a : ℤ
b : ℤ√d
⊢ (↑a * b).re = a * b.re
Theorem: Ordinal.sup_le_sup
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: cases'
  typein_surj r'
    (by
      rw [ho', ← ho]
      exact typein_lt_type r i) with
  j hj
state_before: α : Type ?u.305800
β : Type ?u.305803
γ : Type ?u.305806
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι ι' : Type u
r : ι → ι → Prop
r' : ι' → ι' → Prop
inst✝¹ : IsWellOrder ι r
inst✝ : IsWellOrder ι' r'
o : Ordinal
ho : type r = o
ho' : type r' = o
f : (a : Ordinal) → a < o → Ordinal
i : ι
⊢ familyOfBFamily' r ho f i ≤ sup (familyOfBFamily' r' ho' f)

tactic: simp_rw [familyOfBFamily', ← hj]
state_before: case intro
α : Type ?u.305800
β : Type ?u.305803
γ : Type ?u.305806
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι ι' : Type u
r : ι → ι → Prop
r' : ι' → ι' → Prop
inst✝¹ : IsWellOrder ι r
inst✝ : IsWellOrder ι' r'
o : Ordinal
ho : type r = o
ho' : type r' = o
f : (a : Ordinal) → a < o → Ordinal
i : ι
j : ι'
hj : typein r' j = typein r i
⊢ familyOfBFamily' r ho f i ≤ sup (familyOfBFamily' r' ho' f)

tactic: apply le_sup
state_before: case intro
α : Type ?u.305800
β : Type ?u.305803
γ : Type ?u.305806
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι ι' : Type u
r : ι → ι → Prop
r' : ι' → ι' → Prop
inst✝¹ : IsWellOrder ι r
inst✝ : IsWellOrder ι' r'
o : Ordinal
ho : type r = o
ho' : type r' = o
f : (a : Ordinal) → a < o → Ordinal
i : ι
j : ι'
hj : typein r' j = typein r i
⊢ f (typein r' j) (_ : typein r' j < o) ≤ sup fun i => f (typein r' i) (_ : typein r' i < o)

tactic: rw [ho', ← ho]
state_before: α : Type ?u.305800
β : Type ?u.305803
γ : Type ?u.305806
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι ι' : Type u
r : ι → ι → Prop
r' : ι' → ι' → Prop
inst✝¹ : IsWellOrder ι r
inst✝ : IsWellOrder ι' r'
o : Ordinal
ho : type r = o
ho' : type r' = o
f : (a : Ordinal) → a < o → Ordinal
i : ι
⊢ ?m.306085 < type r'

tactic: exact typein_lt_type r i
state_before: α : Type ?u.305800
β : Type ?u.305803
γ : Type ?u.305806
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι ι' : Type u
r : ι → ι → Prop
r' : ι' → ι' → Prop
inst✝¹ : IsWellOrder ι r
inst✝ : IsWellOrder ι' r'
o : Ordinal
ho : type r = o
ho' : type r' = o
f : (a : Ordinal) → a < o → Ordinal
i : ι
⊢ ?m.306085 < type r

α : Type ?u.305800
β : Type ?u.305803
γ : Type ?u.305806
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι ι' : Type u
r : ι → ι → Prop
r' : ι' → ι' → Prop
inst✝¹ : IsWellOrder ι r
inst✝ : IsWellOrder ι' r'
o : Ordinal
ho : type r = o
ho' : type r' = o
f : (a : Ordinal) → a < o → Ordinal
i : ι
⊢ Ordinal

α : Type ?u.305800
β : Type ?u.305803
γ : Type ?u.305806
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι ι' : Type u
r : ι → ι → Prop
r' : ι' → ι' → Prop
inst✝¹ : IsWellOrder ι r
inst✝ : IsWellOrder ι' r'
o : Ordinal
ho : type r = o
ho' : type r' = o
f : (a : Ordinal) → a < o → Ordinal
i : ι
⊢ Ordinal
Theorem: PNat.XgcdType.reduce_isSpecial
File: Mathlib/Data/PNat/Xgcd.lean

tactic: rw [reduce_a h]
state_before: u✝ x✝ : XgcdType
u : XgcdType := x✝
h : r u = 0
hs : IsSpecial x✝
⊢ IsSpecial (reduce x✝)

tactic: exact u.finish_isSpecial hs
state_before: u✝ x✝ : XgcdType
u : XgcdType := x✝
h : r u = 0
hs : IsSpecial x✝
⊢ IsSpecial (finish u)

tactic: have : SizeOf.sizeOf u.step < SizeOf.sizeOf u := u.step_wf h
state_before: u✝ x✝ : XgcdType
u : XgcdType := x✝
h : ¬r u = 0
hs : IsSpecial x✝
⊢ IsSpecial (reduce x✝)

tactic: rw [reduce_b h]
state_before: u✝ x✝ : XgcdType
u : XgcdType := x✝
h : ¬r u = 0
hs : IsSpecial x✝
this : sizeOf (step u) < sizeOf u
⊢ IsSpecial (reduce x✝)

tactic: exact (flip_isSpecial _).mpr (reduce_isSpecial _ (u.step_isSpecial hs))
state_before: u✝ x✝ : XgcdType
u : XgcdType := x✝
h : ¬r u = 0
hs : IsSpecial x✝
this : sizeOf (step u) < sizeOf u
⊢ IsSpecial (flip (reduce (step u)))
Theorem: Matrix.StdBasisMatrix.apply_of_row_ne
File: Mathlib/Data/Matrix/Basis.lean

tactic: simp [hi]
state_before: l : Type ?u.22747
m : Type u_1
n : Type u_3
R : Type ?u.22756
α : Type u_2
inst✝³ : DecidableEq l
inst✝² : DecidableEq m
inst✝¹ : DecidableEq n
inst✝ : Semiring α
i✝ : m
j✝ : n
c : α
i'✝ : m
j'✝ : n
i i' : m
hi : i ≠ i'
j j' : n
a : α
⊢ stdBasisMatrix i j a i' j' = 0
Theorem: Bool.beq_to_eq
File: src/lean/Init/SimpLemmas.lean

tactic: cases a <;> cases b <;> decide
state_before: a b : Bool
⊢ ((a == b) = true) = (a = b)
Theorem: List.disjoint_take_drop
File: Std/Data/List/Lemmas.lean

tactic: simp
state_before: α : Type u_1
m n : Nat
x✝¹ : Nodup []
x✝ : m ≤ n
⊢ Disjoint (take m []) (drop n [])

tactic: cases m <;> cases n <;> simp only [disjoint_cons_left, mem_cons, disjoint_cons_right,
  drop, true_or, eq_self_iff_true, not_true, false_and, not_mem_nil, disjoint_nil_left, take]
state_before: α : Type u_1
m n : Nat
x : α
xs : List α
hl : Nodup (x :: xs)
h : m ≤ n
⊢ Disjoint (take m (x :: xs)) (drop n (x :: xs))

tactic: case succ.zero => cases h
state_before: case succ.zero
α : Type u_1
x : α
xs : List α
hl : Nodup (x :: xs)
n✝ : Nat
h : succ n✝ ≤ zero
⊢ False

tactic: cases h
state_before: α : Type u_1
x : α
xs : List α
hl : Nodup (x :: xs)
n✝ : Nat
h : succ n✝ ≤ zero
⊢ False

tactic: cases hl with | cons h₀ h₁ =>
refine ⟨fun h => h₀ _ (mem_of_mem_drop h) rfl, ?_⟩
exact disjoint_take_drop h₁ (Nat.le_of_succ_le_succ h)
state_before: case succ.succ
α : Type u_1
x : α
xs : List α
hl : Nodup (x :: xs)
n✝¹ n✝ : Nat
h : succ n✝¹ ≤ succ n✝
⊢ ¬x ∈ drop n✝ xs ∧ Disjoint (take n✝¹ xs) (drop n✝ xs)

tactic: refine ⟨fun h => h₀ _ (mem_of_mem_drop h) rfl, ?_⟩
state_before: case succ.succ.cons
α : Type u_1
x : α
xs : List α
n✝¹ n✝ : Nat
h : succ n✝¹ ≤ succ n✝
h₁ : Pairwise (fun x x_1 => x ≠ x_1) xs
h₀ : ∀ (a' : α), a' ∈ xs → x ≠ a'
⊢ ¬x ∈ drop n✝ xs ∧ Disjoint (take n✝¹ xs) (drop n✝ xs)

tactic: exact disjoint_take_drop h₁ (Nat.le_of_succ_le_succ h)
state_before: case succ.succ.cons
α : Type u_1
x : α
xs : List α
n✝¹ n✝ : Nat
h : succ n✝¹ ≤ succ n✝
h₁ : Pairwise (fun x x_1 => x ≠ x_1) xs
h₀ : ∀ (a' : α), a' ∈ xs → x ≠ a'
⊢ Disjoint (take n✝¹ xs) (drop n✝ xs)
Theorem: SeparationQuotient.continuous_lift
File: Mathlib/Topology/Inseparable.lean

tactic: simp only [continuous_iff_continuousOn_univ, continuousOn_lift, preimage_univ]
state_before: X : Type u_1
Y : Type u_2
Z : Type ?u.105005
α : Type ?u.105008
ι : Type ?u.105011
π : ι → Type ?u.105016
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : (i : ι) → TopologicalSpace (π i)
x y z : X
s : Set X
f✝ : X → Y
t : Set (SeparationQuotient X)
f : X → Y
hf : ∀ (x y : X), (x ~ᵢ y) → f x = f y
⊢ Continuous (lift f hf) ↔ Continuous f
Theorem: EReal.toReal_add
File: Mathlib/Data/Real/EReal.lean

tactic: lift x to ℝ using ⟨hx, h'x⟩
state_before: x y : EReal
hx : x ≠ ⊤
h'x : x ≠ ⊥
hy : y ≠ ⊤
h'y : y ≠ ⊥
⊢ toReal (x + y) = toReal x + toReal y

tactic: lift y to ℝ using ⟨hy, h'y⟩
state_before: case intro
y : EReal
hy : y ≠ ⊤
h'y : y ≠ ⊥
x : ℝ
hx : ↑x ≠ ⊤
h'x : ↑x ≠ ⊥
⊢ toReal (↑x + y) = toReal ↑x + toReal y

tactic: rfl
state_before: case intro.intro
x : ℝ
hx : ↑x ≠ ⊤
h'x : ↑x ≠ ⊥
y : ℝ
hy : ↑y ≠ ⊤
h'y : ↑y ≠ ⊥
⊢ toReal (↑x + ↑y) = toReal ↑x + toReal ↑y
Theorem: Function.sometimes_spec
File: Mathlib/Logic/Function/Basic.lean

tactic: rwa [sometimes_eq]
state_before: p : Prop
α : Sort u_1
inst✝ : Nonempty α
P : α → Prop
f : p → α
a : p
h : P (f a)
⊢ P (sometimes f)
Theorem: Monotone.seq_le_seq
File: Mathlib/Order/Iterate.lean

tactic: induction' n with n ihn
state_before: α : Type u_1
inst✝ : Preorder α
f : α → α
x y : ℕ → α
hf : Monotone f
n : ℕ
h₀ : x 0 ≤ y 0
hx : ∀ (k : ℕ), k < n → x (k + 1) ≤ f (x k)
hy : ∀ (k : ℕ), k < n → f (y k) ≤ y (k + 1)
⊢ x n ≤ y n

tactic: exact h₀
state_before: case zero
α : Type u_1
inst✝ : Preorder α
f : α → α
x y : ℕ → α
hf : Monotone f
n : ℕ
h₀ : x 0 ≤ y 0
hx✝ : ∀ (k : ℕ), k < n → x (k + 1) ≤ f (x k)
hy✝ : ∀ (k : ℕ), k < n → f (y k) ≤ y (k + 1)
hx : ∀ (k : ℕ), k < Nat.zero → x (k + 1) ≤ f (x k)
hy : ∀ (k : ℕ), k < Nat.zero → f (y k) ≤ y (k + 1)
⊢ x Nat.zero ≤ y Nat.zero

tactic: refine' (hx _ n.lt_succ_self).trans ((hf $ ihn _ _).trans (hy _ n.lt_succ_self))
state_before: case succ
α : Type u_1
inst✝ : Preorder α
f : α → α
x y : ℕ → α
hf : Monotone f
n✝ : ℕ
h₀ : x 0 ≤ y 0
hx✝ : ∀ (k : ℕ), k < n✝ → x (k + 1) ≤ f (x k)
hy✝ : ∀ (k : ℕ), k < n✝ → f (y k) ≤ y (k + 1)
n : ℕ
ihn : (∀ (k : ℕ), k < n → x (k + 1) ≤ f (x k)) → (∀ (k : ℕ), k < n → f (y k) ≤ y (k + 1)) → x n ≤ y n
hx : ∀ (k : ℕ), k < Nat.succ n → x (k + 1) ≤ f (x k)
hy : ∀ (k : ℕ), k < Nat.succ n → f (y k) ≤ y (k + 1)
⊢ x (Nat.succ n) ≤ y (Nat.succ n)

tactic: exact fun k hk => hx _ (hk.trans n.lt_succ_self)
state_before: case succ.refine'_1
α : Type u_1
inst✝ : Preorder α
f : α → α
x y : ℕ → α
hf : Monotone f
n✝ : ℕ
h₀ : x 0 ≤ y 0
hx✝ : ∀ (k : ℕ), k < n✝ → x (k + 1) ≤ f (x k)
hy✝ : ∀ (k : ℕ), k < n✝ → f (y k) ≤ y (k + 1)
n : ℕ
ihn : (∀ (k : ℕ), k < n → x (k + 1) ≤ f (x k)) → (∀ (k : ℕ), k < n → f (y k) ≤ y (k + 1)) → x n ≤ y n
hx : ∀ (k : ℕ), k < Nat.succ n → x (k + 1) ≤ f (x k)
hy : ∀ (k : ℕ), k < Nat.succ n → f (y k) ≤ y (k + 1)
⊢ ∀ (k : ℕ), k < n → x (k + 1) ≤ f (x k)

case succ.refine'_2
α : Type u_1
inst✝ : Preorder α
f : α → α
x y : ℕ → α
hf : Monotone f
n✝ : ℕ
h₀ : x 0 ≤ y 0
hx✝ : ∀ (k : ℕ), k < n✝ → x (k + 1) ≤ f (x k)
hy✝ : ∀ (k : ℕ), k < n✝ → f (y k) ≤ y (k + 1)
n : ℕ
ihn : (∀ (k : ℕ), k < n → x (k + 1) ≤ f (x k)) → (∀ (k : ℕ), k < n → f (y k) ≤ y (k + 1)) → x n ≤ y n
hx : ∀ (k : ℕ), k < Nat.succ n → x (k + 1) ≤ f (x k)
hy : ∀ (k : ℕ), k < Nat.succ n → f (y k) ≤ y (k + 1)
⊢ ∀ (k : ℕ), k < n → f (y k) ≤ y (k + 1)

tactic: exact fun k hk => hy _ (hk.trans n.lt_succ_self)
state_before: case succ.refine'_2
α : Type u_1
inst✝ : Preorder α
f : α → α
x y : ℕ → α
hf : Monotone f
n✝ : ℕ
h₀ : x 0 ≤ y 0
hx✝ : ∀ (k : ℕ), k < n✝ → x (k + 1) ≤ f (x k)
hy✝ : ∀ (k : ℕ), k < n✝ → f (y k) ≤ y (k + 1)
n : ℕ
ihn : (∀ (k : ℕ), k < n → x (k + 1) ≤ f (x k)) → (∀ (k : ℕ), k < n → f (y k) ≤ y (k + 1)) → x n ≤ y n
hx : ∀ (k : ℕ), k < Nat.succ n → x (k + 1) ≤ f (x k)
hy : ∀ (k : ℕ), k < Nat.succ n → f (y k) ≤ y (k + 1)
⊢ ∀ (k : ℕ), k < n → f (y k) ≤ y (k + 1)
Theorem: EuclideanGeometry.dist_smul_vadd_sq
File: Mathlib/Geometry/Euclidean/Basic.lean

tactic: rw [dist_eq_norm_vsub V _ p₂, ← real_inner_self_eq_norm_mul_norm, vadd_vsub_assoc,
  real_inner_add_add_self, real_inner_smul_left, real_inner_smul_left, real_inner_smul_right]
state_before: V : Type u_2
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
r : ℝ
v : V
p₁ p₂ : P
⊢ dist (r • v +ᵥ p₁) p₂ * dist (r • v +ᵥ p₁) p₂ =
    inner v v * r * r + 2 * inner v (p₁ -ᵥ p₂) * r + inner (p₁ -ᵥ p₂) (p₁ -ᵥ p₂)

tactic: ring
state_before: V : Type u_2
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
r : ℝ
v : V
p₁ p₂ : P
⊢ r * (r * inner v v) + 2 * (r * inner v (p₁ -ᵥ p₂)) + inner (p₁ -ᵥ p₂) (p₁ -ᵥ p₂) =
    inner v v * r * r + 2 * inner v (p₁ -ᵥ p₂) * r + inner (p₁ -ᵥ p₂) (p₁ -ᵥ p₂)
Theorem: LinearMap.ker_eq_bot_iff_range_eq_top
File: Mathlib/LinearAlgebra/FiniteDimensional.lean

tactic: rw [range_eq_top, ker_eq_bot, injective_iff_surjective]
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
f : V →ₗ[K] V
⊢ ker f = ⊥ ↔ range f = ⊤