tasksource/leandojo huggingface dataset:
Theorem: Std.RBNode.All.balLeft
File: Std/Data/RBMap/WF.lean

tactic: unfold balLeft
state_before: α✝ : Type u_1
p : α✝ → Prop
l : RBNode α✝
v : α✝
r : RBNode α✝
hl : All p l
hv : p v
hr : All p r
⊢ All p (balLeft l v r)

tactic: split <;> simp_all
state_before: α✝ : Type u_1
p : α✝ → Prop
l : RBNode α✝
v : α✝
r : RBNode α✝
hl : All p l
hv : p v
hr : All p r
⊢ All p
    (match l with
    | node red a x b => node red (node black a x b) v r
    | l =>
      match r with
      | node black a y b => balance2 l v (node red a y b)
      | node red (node black a y b) z c => node red (node black l v a) y (balance2 b z (setRed c))
      | r => node red l v r)

tactic: split <;> simp_all [All.setRed]
state_before: case h_2
α✝ : Type u_1
p : α✝ → Prop
l : RBNode α✝
v : α✝
r l✝ : RBNode α✝
hl : All p l
hv : p v
hr : All p r
x✝ : ∀ (a : RBNode α✝) (x : α✝) (b : RBNode α✝), l = node red a x b → False
⊢ All p
    (match r with
    | node black a y b => balance2 l v (node red a y b)
    | node red (node black a y b) z c => node red (node black l v a) y (balance2 b z (setRed c))
    | r => node red l v r)
Theorem: Polynomial.coeff_X_add_C_pow
File: Mathlib/Data/Polynomial/Coeff.lean

tactic: rw [(commute_X (C r : R[X])).add_pow, ← lcoeff_apply, LinearMap.map_sum]
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r✝ : R[X]
r : R
n k : ℕ
⊢ coeff ((X + ↑C r) ^ n) k = r ^ (n - k) * ↑(Nat.choose n k)

tactic: simp only [one_pow, mul_one, lcoeff_apply, ← C_eq_nat_cast, ← C_pow, coeff_mul_C, Nat.cast_id]
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r✝ : R[X]
r : R
n k : ℕ
⊢ ∑ i in range (n + 1), ↑(lcoeff R k) (X ^ i * ↑C r ^ (n - i) * ↑(Nat.choose n i)) = r ^ (n - k) * ↑(Nat.choose n k)

tactic: rw [Finset.sum_eq_single k, coeff_X_pow_self, one_mul]
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r✝ : R[X]
r : R
n k : ℕ
⊢ ∑ x in range (n + 1), coeff (X ^ x) k * r ^ (n - x) * ↑(Nat.choose n x) = r ^ (n - k) * ↑(Nat.choose n k)

tactic: intro _ _ h
state_before: case h₀
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r✝ : R[X]
r : R
n k : ℕ
⊢ ∀ (b : ℕ), b ∈ range (n + 1) → b ≠ k → coeff (X ^ b) k * r ^ (n - b) * ↑(Nat.choose n b) = 0

tactic: simp [coeff_X_pow, h.symm]
state_before: case h₀
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r✝ : R[X]
r : R
n k b✝ : ℕ
a✝ : b✝ ∈ range (n + 1)
h : b✝ ≠ k
⊢ coeff (X ^ b✝) k * r ^ (n - b✝) * ↑(Nat.choose n b✝) = 0

tactic: simp only [coeff_X_pow_self, one_mul, not_lt, Finset.mem_range]
state_before: case h₁
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r✝ : R[X]
r : R
n k : ℕ
⊢ ¬k ∈ range (n + 1) → coeff (X ^ k) k * r ^ (n - k) * ↑(Nat.choose n k) = 0

tactic: intro h
state_before: case h₁
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r✝ : R[X]
r : R
n k : ℕ
⊢ n + 1 ≤ k → r ^ (n - k) * ↑(Nat.choose n k) = 0

tactic: rw [Nat.choose_eq_zero_of_lt h, Nat.cast_zero, mul_zero]
state_before: case h₁
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r✝ : R[X]
r : R
n k : ℕ
h : n + 1 ≤ k
⊢ r ^ (n - k) * ↑(Nat.choose n k) = 0
Theorem: Nat.card_of_subsingleton
File: Mathlib/SetTheory/Cardinal/Finite.lean

tactic: letI := Fintype.ofSubsingleton a
state_before: α : Type u_1
β : Type ?u.9267
a : α
inst✝ : Subsingleton α
⊢ Nat.card α = 1

tactic: rw [card_eq_fintype_card, Fintype.card_ofSubsingleton a]
state_before: α : Type u_1
β : Type ?u.9267
a : α
inst✝ : Subsingleton α
this : Fintype α := Fintype.ofSubsingleton a
⊢ Nat.card α = 1
Theorem: integrableOn_Icc_iff_integrableOn_Ioo
File: Mathlib/MeasureTheory/Integral/IntegrableOn.lean

tactic: rw [integrableOn_Icc_iff_integrableOn_Ioc, integrableOn_Ioc_iff_integrableOn_Ioo]
state_before: α : Type u_1
β : Type ?u.4455149
E : Type u_2
F : Type ?u.4455155
inst✝⁴ : MeasurableSpace α
inst✝³ : NormedAddCommGroup E
inst✝² : PartialOrder α
inst✝¹ : MeasurableSingletonClass α
f : α → E
μ : MeasureTheory.Measure α
a b : α
inst✝ : NoAtoms μ
⊢ IntegrableOn f (Icc a b) ↔ IntegrableOn f (Ioo a b)
Theorem: Associates.factors_prime_pow
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: rw [Associates.factors_prod, FactorSet.prod]
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝¹ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
inst✝ : Nontrivial α
p : Associates α
hp : Irreducible p
k : ℕ
⊢ FactorSet.prod (factors (p ^ k)) = FactorSet.prod (some (replicate k { val := p, property := hp }))

tactic: dsimp
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝¹ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
inst✝ : Nontrivial α
p : Associates α
hp : Irreducible p
k : ℕ
⊢ p ^ k =
    match some (replicate k { val := p, property := hp }) with
    | none => 0
    | some s => prod (map Subtype.val s)

tactic: rw [Multiset.map_replicate, Multiset.prod_replicate, Subtype.coe_mk]
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝¹ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
inst✝ : Nontrivial α
p : Associates α
hp : Irreducible p
k : ℕ
⊢ p ^ k = prod (map Subtype.val (replicate k { val := p, property := hp }))
Theorem: IsIntegral.det
File: Mathlib/RingTheory/IntegralClosure.lean

tactic: rw [Matrix.det_apply]
state_before: R : Type u_3
A : Type u_2
B : Type ?u.807401
S : Type ?u.807404
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : CommRing S
inst✝³ : Algebra R A
inst✝² : Algebra R B
f : R →+* S
n : Type u_1
inst✝¹ : Fintype n
inst✝ : DecidableEq n
M : Matrix n n A
h : ∀ (i j : n), IsIntegral R (M i j)
⊢ IsIntegral R (Matrix.det M)

tactic: exact IsIntegral.sum _ fun σ _hσ => IsIntegral.zsmul (IsIntegral.prod _ fun i _hi => h _ _) _
state_before: R : Type u_3
A : Type u_2
B : Type ?u.807401
S : Type ?u.807404
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : CommRing S
inst✝³ : Algebra R A
inst✝² : Algebra R B
f : R →+* S
n : Type u_1
inst✝¹ : Fintype n
inst✝ : DecidableEq n
M : Matrix n n A
h : ∀ (i j : n), IsIntegral R (M i j)
⊢ IsIntegral R (∑ σ : Equiv.Perm n, ↑Equiv.Perm.sign σ • ∏ i : n, M (↑σ i) i)
Theorem: Finset.fold_image
File: Mathlib/Data/Finset/Fold.lean

tactic: simp only [fold, image_val_of_injOn H, Multiset.map_map]
state_before: α : Type u_1
β : Type u_3
γ : Type u_2
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a : α
inst✝ : DecidableEq α
g : γ → α
s : Finset γ
H : ∀ (x : γ), x ∈ s → ∀ (y : γ), y ∈ s → g x = g y → x = y
⊢ fold op b f (image g s) = fold op b (f ∘ g) s
Theorem: Int.ofNat_sub
File: Std/Data/Int/Lemmas.lean

tactic: match m with
| 0 => rfl
| succ m =>
  show ofNat (n - succ m) = subNatNat n (succ m)
  rw [subNatNat, Nat.sub_eq_zero_of_le h]
state_before: m n : Nat
h : m ≤ n
⊢ ↑(n - m) = ↑n - ↑m

tactic: rfl
state_before: m n : Nat
h : 0 ≤ n
⊢ ↑(n - 0) = ↑n - ↑0

tactic: show ofNat (n - succ m) = subNatNat n (succ m)
state_before: m✝ n m : Nat
h : succ m ≤ n
⊢ ↑(n - succ m) = ↑n - ↑(succ m)

tactic: rw [subNatNat, Nat.sub_eq_zero_of_le h]
state_before: m✝ n m : Nat
h : succ m ≤ n
⊢ ofNat (n - succ m) = subNatNat n (succ m)
Theorem: Polynomial.coeff_update_apply
File: Mathlib/Data/Polynomial/Basic.lean

tactic: rw [coeff_update, Function.update_apply]
state_before: R : Type u
a✝ b : R
m n✝ : ℕ
inst✝ : Semiring R
p✝ q p : R[X]
n : ℕ
a : R
i : ℕ
⊢ coeff (update p n a) i = if i = n then a else coeff p i
Theorem: Ideal.eq_top_iff_one
File: Mathlib/RingTheory/Ideal/Basic.lean

tactic: rintro rfl
state_before: α : Type u
β : Type v
inst✝ : Semiring α
I : Ideal α
a b : α
⊢ I = ⊤ → 1 ∈ I

tactic: trivial
state_before: α : Type u
β : Type v
inst✝ : Semiring α
a b : α
⊢ 1 ∈ ⊤

tactic: simp
state_before: α : Type u
β : Type v
inst✝ : Semiring α
I : Ideal α
a b : α
h : 1 ∈ I
⊢ 1 * 1 = 1
Theorem: not_nat_primrec_ack_self
File: Mathlib/Computability/Ackermann.lean

tactic: cases' exists_lt_ack_of_nat_primrec h with m hm
state_before: h : Nat.Primrec fun n => ack n n
⊢ False

tactic: exact (hm m).false
state_before: case intro
h : Nat.Primrec fun n => ack n n
m : ℕ
hm : ∀ (n : ℕ), ack n n < ack m n
⊢ False
Theorem: Polynomial.splits_of_map_eq_C
File: Mathlib/Data/Polynomial/Splits.lean

tactic: have := congr_arg degree hp
state_before: F : Type u
K : Type v
L : Type w
inst✝² : CommRing K
inst✝¹ : Field L
inst✝ : Field F
i : K →+* L
f : K[X]
a : L
h : map i f = ↑C a
ha : ¬a = 0
g✝ : L[X]
hg : Irreducible g✝
x✝ : g✝ ∣ map i f
p : L[X]
hp : map i f = g✝ * p
⊢ degree g✝ = 0

tactic: rw [h, degree_C ha, degree_mul, @eq_comm (WithBot ℕ) 0,
    Nat.WithBot.add_eq_zero_iff] at this
state_before: F : Type u
K : Type v
L : Type w
inst✝² : CommRing K
inst✝¹ : Field L
inst✝ : Field F
i : K →+* L
f : K[X]
a : L
h : map i f = ↑C a
ha : ¬a = 0
g✝ : L[X]
hg : Irreducible g✝
x✝ : g✝ ∣ map i f
p : L[X]
hp : map i f = g✝ * p
this : degree (map i f) = degree (g✝ * p)
⊢ degree g✝ = 0

tactic: exact this.1
state_before: F : Type u
K : Type v
L : Type w
inst✝² : CommRing K
inst✝¹ : Field L
inst✝ : Field F
i : K →+* L
f : K[X]
a : L
h : map i f = ↑C a
ha : ¬a = 0
g✝ : L[X]
hg : Irreducible g✝
x✝ : g✝ ∣ map i f
p : L[X]
hp : map i f = g✝ * p
this : degree g✝ = 0 ∧ degree p = 0
⊢ degree g✝ = 0
Theorem: Finset.sum_powerset_neg_one_pow_card
File: Mathlib/Data/Nat/Choose/Sum.lean

tactic: rw [sum_powerset_apply_card]
state_before: R : Type ?u.208984
α : Type u_1
inst✝ : DecidableEq α
x : Finset α
⊢ ∑ m in powerset x, (-1) ^ card m = if x = ∅ then 1 else 0

tactic: simp only [nsmul_eq_mul', ← card_eq_zero, Int.alternating_sum_range_choose]
state_before: R : Type ?u.208984
α : Type u_1
inst✝ : DecidableEq α
x : Finset α
⊢ ∑ m in range (card x + 1), Nat.choose (card x) m • (-1) ^ m = if x = ∅ then 1 else 0
Theorem: Behrend.map_mod
File: Mathlib/Combinatorics/Additive/Behrend.lean

tactic: rw [map_succ, Nat.add_mul_mod_self_right]
state_before: α : Type ?u.214641
β : Type ?u.214644
n d k N : ℕ
x : Fin n → ℕ
a : Fin (succ n) → ℕ
⊢ ↑(map d) a % d = a 0 % d
Theorem: Subgroup.sylow_mem_fixedPoints_iff
File: Mathlib/GroupTheory/Sylow.lean

tactic: simp_rw [SetLike.le_def, ← Sylow.smul_eq_iff_mem_normalizer]
state_before: p : ℕ
G : Type u_1
inst✝ : Group G
H : Subgroup G
P : Sylow p G
⊢ P ∈ fixedPoints { x // x ∈ H } (Sylow p G) ↔ H ≤ normalizer ↑P

tactic: exact Subtype.forall
state_before: p : ℕ
G : Type u_1
inst✝ : Group G
H : Subgroup G
P : Sylow p G
⊢ P ∈ fixedPoints { x // x ∈ H } (Sylow p G) ↔ ∀ ⦃x : G⦄, x ∈ H → x • P = P
Theorem: CategoryTheory.strongEpi_of_strongEpi
File: Mathlib/CategoryTheory/Limits/Shapes/StrongEpi.lean

tactic: constructor
state_before: C : Type u
inst✝¹ : Category C
P Q R : C
f : P ⟶ Q
g : Q ⟶ R
inst✝ : StrongEpi (f ≫ g)
X Y : C
z : X ⟶ Y
x✝ : Mono z
⊢ HasLiftingProperty g z

tactic: intro u v sq
state_before: case sq_hasLift
C : Type u
inst✝¹ : Category C
P Q R : C
f : P ⟶ Q
g : Q ⟶ R
inst✝ : StrongEpi (f ≫ g)
X Y : C
z : X ⟶ Y
x✝ : Mono z
⊢ ∀ {f : Q ⟶ X} {g_1 : R ⟶ Y} (sq : CommSq f g z g_1), CommSq.HasLift sq

tactic: have h₀ : (f ≫ u) ≫ z = (f ≫ g) ≫ v := by simp only [Category.assoc, sq.w]
state_before: case sq_hasLift
C : Type u
inst✝¹ : Category C
P Q R : C
f : P ⟶ Q
g : Q ⟶ R
inst✝ : StrongEpi (f ≫ g)
X Y : C
z : X ⟶ Y
x✝ : Mono z
u : Q ⟶ X
v : R ⟶ Y
sq : CommSq u g z v
⊢ CommSq.HasLift sq

tactic: exact
  CommSq.HasLift.mk'
    ⟨(CommSq.mk h₀).lift, by
      simp only [← cancel_mono z, Category.assoc, CommSq.fac_right, sq.w], by simp⟩
state_before: case sq_hasLift
C : Type u
inst✝¹ : Category C
P Q R : C
f : P ⟶ Q
g : Q ⟶ R
inst✝ : StrongEpi (f ≫ g)
X Y : C
z : X ⟶ Y
x✝ : Mono z
u : Q ⟶ X
v : R ⟶ Y
sq : CommSq u g z v
h₀ : (f ≫ u) ≫ z = (f ≫ g) ≫ v
⊢ CommSq.HasLift sq

tactic: simp only [Category.assoc, sq.w]
state_before: C : Type u
inst✝¹ : Category C
P Q R : C
f : P ⟶ Q
g : Q ⟶ R
inst✝ : StrongEpi (f ≫ g)
X Y : C
z : X ⟶ Y
x✝ : Mono z
u : Q ⟶ X
v : R ⟶ Y
sq : CommSq u g z v
⊢ (f ≫ u) ≫ z = (f ≫ g) ≫ v

tactic: simp only [← cancel_mono z, Category.assoc, CommSq.fac_right, sq.w]
state_before: C : Type u
inst✝¹ : Category C
P Q R : C
f : P ⟶ Q
g : Q ⟶ R
inst✝ : StrongEpi (f ≫ g)
X Y : C
z : X ⟶ Y
x✝ : Mono z
u : Q ⟶ X
v : R ⟶ Y
sq : CommSq u g z v
h₀ : (f ≫ u) ≫ z = (f ≫ g) ≫ v
⊢ g ≫ CommSq.lift (_ : CommSq (f ≫ u) (f ≫ g) z v) = u

tactic: simp
state_before: C : Type u
inst✝¹ : Category C
P Q R : C
f : P ⟶ Q
g : Q ⟶ R
inst✝ : StrongEpi (f ≫ g)
X Y : C
z : X ⟶ Y
x✝ : Mono z
u : Q ⟶ X
v : R ⟶ Y
sq : CommSq u g z v
h₀ : (f ≫ u) ≫ z = (f ≫ g) ≫ v
⊢ CommSq.lift (_ : CommSq (f ≫ u) (f ≫ g) z v) ≫ z = v
Theorem: compl_compl_inf_distrib
File: Mathlib/Order/Heyting/Basic.lean

tactic: refine' ((compl_anti compl_sup_compl_le).trans (compl_sup_distrib _ _).le).antisymm _
state_before: ι : Type ?u.164668
α : Type u_1
β : Type ?u.164674
inst✝ : HeytingAlgebra α
a✝ b✝ c a b : α
⊢ (a ⊓ b)ᶜᶜ = aᶜᶜ ⊓ bᶜᶜ

tactic: rw [le_compl_iff_disjoint_right, disjoint_assoc, disjoint_compl_compl_left_iff,
  disjoint_left_comm, disjoint_compl_compl_left_iff, ← disjoint_assoc, inf_comm]
state_before: ι : Type ?u.164668
α : Type u_1
β : Type ?u.164674
inst✝ : HeytingAlgebra α
a✝ b✝ c a b : α
⊢ aᶜᶜ ⊓ bᶜᶜ ≤ (a ⊓ b)ᶜᶜ

tactic: exact disjoint_compl_right
state_before: ι : Type ?u.164668
α : Type u_1
β : Type ?u.164674
inst✝ : HeytingAlgebra α
a✝ b✝ c a b : α
⊢ Disjoint (a ⊓ b) ((a ⊓ b)ᶜ)
Theorem: Multiset.Ico_filter_lt_of_right_le
File: Mathlib/Data/Multiset/LocallyFinite.lean

tactic: rw [Ico, ← Finset.filter_val, Finset.Ico_filter_lt_of_right_le hbc]
state_before: α : Type u_1
inst✝² : Preorder α
inst✝¹ : LocallyFiniteOrder α
a b c : α
inst✝ : DecidablePred fun x => x < c
hbc : b ≤ c
⊢ filter (fun x => x < c) (Ico a b) = Ico a b
Theorem: inducing_prod_const
File: Mathlib/Topology/Constructions.lean

tactic: simp_rw [inducing_iff, instTopologicalSpaceProd, induced_inf, induced_compose, Function.comp,
  induced_const, inf_top_eq]
state_before: α : Type u
β : Type v
γ : Type u_1
δ : Type ?u.66912
ε : Type ?u.66915
ζ : Type ?u.66918
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : TopologicalSpace δ
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
b : β
f : α → γ
⊢ (Inducing fun x => (f x, b)) ↔ Inducing f
Theorem: Nat.base_pow_length_digits_le'
File: Mathlib/Data/Nat/Digits.lean

tactic: have : digits (b + 2) m ≠ [] := digits_ne_nil_iff_ne_zero.mpr hm
state_before: n b m : ℕ
hm : m ≠ 0
⊢ (b + 2) ^ List.length (digits (b + 2) m) ≤ (b + 2) * m

tactic: convert @pow_length_le_mul_ofDigits b (digits (b+2) m)
  this (getLast_digit_ne_zero _ hm)
state_before: n b m : ℕ
hm : m ≠ 0
this : digits (b + 2) m ≠ []
⊢ (b + 2) ^ List.length (digits (b + 2) m) ≤ (b + 2) * m

tactic: rw [ofDigits_digits]
state_before: case h.e'_4.h.e'_6
n b m : ℕ
hm : m ≠ 0
this : digits (b + 2) m ≠ []
⊢ m = ofDigits (b + 2) (digits (b + 2) m)
Theorem: TopologicalSpace.IsTopologicalBasis.exists_mem_of_ne
File: Mathlib/Topology/Separation.lean

tactic: rcases hb.isOpen_iff.1 isOpen_ne x h with ⟨a, ab, xa, ha⟩
state_before: α : Type u
β : Type v
inst✝¹ : TopologicalSpace α
inst✝ : T1Space α
b : Set (Set α)
hb : IsTopologicalBasis b
x y : α
h : x ≠ y
⊢ ∃ a, a ∈ b ∧ x ∈ a ∧ ¬y ∈ a

tactic: exact ⟨a, ab, xa, fun h => ha h rfl⟩
state_before: case intro.intro.intro
α : Type u
β : Type v
inst✝¹ : TopologicalSpace α
inst✝ : T1Space α
b : Set (Set α)
hb : IsTopologicalBasis b
x y : α
h : x ≠ y
a : Set α
ab : a ∈ b
xa : x ∈ a
ha : a ⊆ {y_1 | y_1 ≠ y}
⊢ ∃ a, a ∈ b ∧ x ∈ a ∧ ¬y ∈ a
Theorem: List.get?_take
File: Mathlib/Data/List/Basic.lean

tactic: induction' n with n hn generalizing l m
state_before: ι : Type ?u.170021
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l : List α
n m : ℕ
h : m < n
⊢ get? (take n l) m = get? l m

tactic: simp only [Nat.zero_eq] at h
state_before: case zero
ι : Type ?u.170021
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l✝ : List α
n m✝ : ℕ
h✝ : m✝ < n
l : List α
m : ℕ
h : m < zero
⊢ get? (take zero l) m = get? l m

tactic: exact absurd h (not_lt_of_le m.zero_le)
state_before: case zero
ι : Type ?u.170021
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l✝ : List α
n m✝ : ℕ
h✝ : m✝ < n
l : List α
m : ℕ
h : m < 0
⊢ get? (take zero l) m = get? l m

tactic: cases' l with hd tl
state_before: case succ
ι : Type ?u.170021
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l✝ : List α
n✝ m✝ : ℕ
h✝ : m✝ < n✝
n : ℕ
hn : ∀ {l : List α} {m : ℕ}, m < n → get? (take n l) m = get? l m
l : List α
m : ℕ
h : m < succ n
⊢ get? (take (succ n) l) m = get? l m

tactic: simp only [take_nil]
state_before: case succ.nil
ι : Type ?u.170021
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l : List α
n✝ m✝ : ℕ
h✝ : m✝ < n✝
n : ℕ
hn : ∀ {l : List α} {m : ℕ}, m < n → get? (take n l) m = get? l m
m : ℕ
h : m < succ n
⊢ get? (take (succ n) []) m = get? [] m

tactic: cases m
state_before: case succ.cons
ι : Type ?u.170021
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l : List α
n✝ m✝ : ℕ
h✝ : m✝ < n✝
n : ℕ
hn : ∀ {l : List α} {m : ℕ}, m < n → get? (take n l) m = get? l m
m : ℕ
h : m < succ n
hd : α
tl : List α
⊢ get? (take (succ n) (hd :: tl)) m = get? (hd :: tl) m

tactic: simp only [get?, take]
state_before: case succ.cons.zero
ι : Type ?u.170021
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l : List α
n✝ m : ℕ
h✝ : m < n✝
n : ℕ
hn : ∀ {l : List α} {m : ℕ}, m < n → get? (take n l) m = get? l m
hd : α
tl : List α
h : zero < succ n
⊢ get? (take (succ n) (hd :: tl)) zero = get? (hd :: tl) zero

tactic: simpa only using hn (Nat.lt_of_succ_lt_succ h)
state_before: case succ.cons.succ
ι : Type ?u.170021
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l : List α
n✝¹ m : ℕ
h✝ : m < n✝¹
n : ℕ
hn : ∀ {l : List α} {m : ℕ}, m < n → get? (take n l) m = get? l m
hd : α
tl : List α
n✝ : ℕ
h : succ n✝ < succ n
⊢ get? (take (succ n) (hd :: tl)) (succ n✝) = get? (hd :: tl) (succ n✝)
Theorem: mulPosMono_iff_covariant_pos
File: Mathlib/Algebra/Order/Ring/Lemmas.lean

tactic: obtain ha | ha := a.prop.eq_or_lt
state_before: α : Type u_1
a✝ b✝ c✝ d : α
inst✝¹ : MulZeroClass α
inst✝ : PartialOrder α
h✝ : CovariantClass { x // 0 < x } α (fun x y => y * ↑x) fun x x_1 => x ≤ x_1
a : { x // 0 ≤ x }
b c : α
h : b ≤ c
⊢ b * ↑a ≤ c * ↑a

tactic: simp [←ha]
state_before: case inl
α : Type u_1
a✝ b✝ c✝ d : α
inst✝¹ : MulZeroClass α
inst✝ : PartialOrder α
h✝ : CovariantClass { x // 0 < x } α (fun x y => y * ↑x) fun x x_1 => x ≤ x_1
a : { x // 0 ≤ x }
b c : α
h : b ≤ c
ha : 0 = ↑a
⊢ b * ↑a ≤ c * ↑a
Theorem: ContractingWith.one_sub_K_ne_top
File: Mathlib/Topology/MetricSpace/Contracting.lean

tactic: norm_cast
state_before: α : Type ?u.2537
inst✝ : EMetricSpace α
cs : CompleteSpace α
K : ℝ≥0
f : α → α
⊢ 1 - ↑K ≠ ⊤

tactic: exact ENNReal.coe_ne_top
state_before: α : Type ?u.2537
inst✝ : EMetricSpace α
cs : CompleteSpace α
K : ℝ≥0
f : α → α
⊢ ¬1 - ↑K = ⊤
Theorem: Real.exp_zero
File: Mathlib/Data/Complex/Exponential.lean

tactic: simp [Real.exp]
state_before: x y : ℝ
⊢ exp 0 = 1
Theorem: NormedAddGroupHom.completion_id
File: Mathlib/Analysis/Normed/Group/HomCompletion.lean

tactic: ext x
state_before: G : Type u_1
inst✝² : SeminormedAddCommGroup G
H : Type ?u.4520
inst✝¹ : SeminormedAddCommGroup H
K : Type ?u.4526
inst✝ : SeminormedAddCommGroup K
⊢ completion (id G) = id (Completion G)

tactic: rw [NormedAddGroupHom.completion_def, NormedAddGroupHom.coe_id, Completion.map_id]
state_before: case H
G : Type u_1
inst✝² : SeminormedAddCommGroup G
H : Type ?u.4520
inst✝¹ : SeminormedAddCommGroup H
K : Type ?u.4526
inst✝ : SeminormedAddCommGroup K
x : Completion G
⊢ ↑(completion (id G)) x = ↑(id (Completion G)) x

tactic: rfl
state_before: case H
G : Type u_1
inst✝² : SeminormedAddCommGroup G
H : Type ?u.4520
inst✝¹ : SeminormedAddCommGroup H
K : Type ?u.4526
inst✝ : SeminormedAddCommGroup K
x : Completion G
⊢ _root_.id x = ↑(id (Completion G)) x
Theorem: Ordinal.mul_sub
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: simp only [a0, zero_mul, sub_self]
state_before: α : Type ?u.246220
β : Type ?u.246223
γ : Type ?u.246226
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b c : Ordinal
a0 : a = 0
⊢ a * (b - c) = a * b - a * c

tactic: rw [sub_le, ← le_div a0, sub_le, ← le_div a0, mul_add_div _ a0]
state_before: α : Type ?u.246220
β : Type ?u.246223
γ : Type ?u.246226
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b c : Ordinal
a0 : ¬a = 0
d : Ordinal
⊢ a * (b - c) ≤ d ↔ a * b - a * c ≤ d
Theorem: Polynomial.Chebyshev.U_add_two
File: Mathlib/RingTheory/Polynomial/Chebyshev.lean

tactic: rw [U]
state_before: R : Type u_1
S : Type ?u.8331
inst✝¹ : CommRing R
inst✝ : CommRing S
n : ℕ
⊢ U R (n + 2) = 2 * X * U R (n + 1) - U R n
Theorem: finAddFlip_apply_mk_right
File: Mathlib/Logic/Equiv/Fin.lean

tactic: convert @finAddFlip_apply_natAdd n ⟨k - m, (tsub_lt_iff_right h₁).2 ?_⟩ m
state_before: m n k : ℕ
h₁ : m ≤ k
h₂ : k < m + n
⊢ ↑finAddFlip { val := k, isLt := h₂ } = { val := k - m, isLt := (_ : k - m < n + m) }

tactic: simp [add_tsub_cancel_of_le h₁]
state_before: case h.e'_2.h.e'_6.h.e'_2
m n k : ℕ
h₁ : m ≤ k
h₂ : k < m + n
⊢ k = ↑(↑(Fin.natAdd m) { val := k - m, isLt := (_ : k - m < n) })

tactic: rwa [add_comm]
state_before: m n k : ℕ
h₁ : m ≤ k
h₂ : k < m + n
⊢ k < n + m
Theorem: ringHom_monotone
File: Mathlib/Algebra/Order/CompleteField.lean

tactic: obtain ⟨s, rfl⟩ := hR r h
state_before: F : Type ?u.192927
α : Type ?u.192930
β : Type ?u.192933
γ : Type ?u.192936
R : Type u_1
S : Type u_2
inst✝¹ : OrderedRing R
inst✝ : LinearOrderedRing S
hR : ∀ (r : R), 0 ≤ r → ∃ s, s ^ 2 = r
f : R →+* S
r : R
h : 0 ≤ r
⊢ 0 ≤ ↑f r

tactic: rw [map_pow]
state_before: case intro
F : Type ?u.192927
α : Type ?u.192930
β : Type ?u.192933
γ : Type ?u.192936
R : Type u_1
S : Type u_2
inst✝¹ : OrderedRing R
inst✝ : LinearOrderedRing S
hR : ∀ (r : R), 0 ≤ r → ∃ s, s ^ 2 = r
f : R →+* S
s : R
h : 0 ≤ s ^ 2
⊢ 0 ≤ ↑f (s ^ 2)

tactic: apply sq_nonneg
state_before: case intro
F : Type ?u.192927
α : Type ?u.192930
β : Type ?u.192933
γ : Type ?u.192936
R : Type u_1
S : Type u_2
inst✝¹ : OrderedRing R
inst✝ : LinearOrderedRing S
hR : ∀ (r : R), 0 ≤ r → ∃ s, s ^ 2 = r
f : R →+* S
s : R
h : 0 ≤ s ^ 2
⊢ 0 ≤ ↑f s ^ 2