tasksource/leandojo huggingface dataset:
Theorem: Matrix.isRepresentation.toEnd_surjective
File: Mathlib/LinearAlgebra/Matrix/Charpoly/LinearMap.lean

tactic: intro f
state_before: ι : Type u_1
inst✝⁴ : Fintype ι
M : Type u_3
inst✝³ : AddCommGroup M
R : Type u_2
inst✝² : CommRing R
inst✝¹ : Module R M
I : Ideal R
b : ι → M
hb : Submodule.span R (Set.range b) = ⊤
inst✝ : DecidableEq ι
⊢ Function.Surjective ↑(toEnd R b hb)

tactic: obtain ⟨M, e, -⟩ := Matrix.isRepresentation.toEnd_exists_mem_ideal R b hb f ⊤ (by simp)
state_before: ι : Type u_1
inst✝⁴ : Fintype ι
M : Type u_3
inst✝³ : AddCommGroup M
R : Type u_2
inst✝² : CommRing R
inst✝¹ : Module R M
I : Ideal R
b : ι → M
hb : Submodule.span R (Set.range b) = ⊤
inst✝ : DecidableEq ι
f : Module.End R M
⊢ ∃ a, ↑(toEnd R b hb) a = f

tactic: exact ⟨M, e⟩
state_before: case intro.intro
ι : Type u_1
inst✝⁴ : Fintype ι
M✝ : Type u_3
inst✝³ : AddCommGroup M✝
R : Type u_2
inst✝² : CommRing R
inst✝¹ : Module R M✝
I : Ideal R
b : ι → M✝
hb : Submodule.span R (Set.range b) = ⊤
inst✝ : DecidableEq ι
f : Module.End R M✝
M : { x // x ∈ isRepresentation R b }
e : ↑(toEnd R b hb) M = f
⊢ ∃ a, ↑(toEnd R b hb) a = f

tactic: simp
state_before: ι : Type u_1
inst✝⁴ : Fintype ι
M : Type u_3
inst✝³ : AddCommGroup M
R : Type u_2
inst✝² : CommRing R
inst✝¹ : Module R M
I : Ideal R
b : ι → M
hb : Submodule.span R (Set.range b) = ⊤
inst✝ : DecidableEq ι
f : Module.End R M
⊢ LinearMap.range f ≤ ⊤ • ⊤
Theorem: WittVector.teichmuller_mul_aux₁
File: Mathlib/RingTheory/WittVector/Teichmuller.lean

tactic: apply (ghostMap.bijective_of_invertible p (MvPolynomial R ℚ)).1
state_before: p : ℕ
R : Type u_1
S : Type ?u.87208
hp : Fact (Nat.Prime p)
inst✝¹ : CommRing R
inst✝ : CommRing S
x y : MvPolynomial R ℚ
⊢ teichmullerFun p (x * y) = teichmullerFun p x * teichmullerFun p y

tactic: rw [RingHom.map_mul]
state_before: case a
p : ℕ
R : Type u_1
S : Type ?u.87208
hp : Fact (Nat.Prime p)
inst✝¹ : CommRing R
inst✝ : CommRing S
x y : MvPolynomial R ℚ
⊢ ↑ghostMap (teichmullerFun p (x * y)) = ↑ghostMap (teichmullerFun p x * teichmullerFun p y)

tactic: ext1 n
state_before: case a
p : ℕ
R : Type u_1
S : Type ?u.87208
hp : Fact (Nat.Prime p)
inst✝¹ : CommRing R
inst✝ : CommRing S
x y : MvPolynomial R ℚ
⊢ ↑ghostMap (teichmullerFun p (x * y)) = ↑ghostMap (teichmullerFun p x) * ↑ghostMap (teichmullerFun p y)

tactic: simp only [Pi.mul_apply, ghostMap_apply, ghostComponent_teichmullerFun, mul_pow]
state_before: case a.h
p : ℕ
R : Type u_1
S : Type ?u.87208
hp : Fact (Nat.Prime p)
inst✝¹ : CommRing R
inst✝ : CommRing S
x y : MvPolynomial R ℚ
n : ℕ
⊢ ↑ghostMap (teichmullerFun p (x * y)) n = (↑ghostMap (teichmullerFun p x) * ↑ghostMap (teichmullerFun p y)) n
Theorem: Basis.repr_support_subset_of_mem_span
File: Mathlib/LinearAlgebra/Basis.lean

tactic: rcases(Finsupp.mem_span_image_iff_total _).1 hm with ⟨l, hl, hlm⟩
state_before: ι✝ : Type ?u.63088
ι' : Type ?u.63091
R : Type u_2
R₂ : Type ?u.63097
K : Type ?u.63100
M : Type u_3
M' : Type ?u.63106
M'' : Type ?u.63109
V : Type u
V' : Type ?u.63114
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
b✝ b₁ : Basis ι✝ R M
i : ι✝
c : R
x : M
ι : Type u_1
b : Basis ι R M
s : Set ι
m : M
hm : m ∈ span R (↑b '' s)
⊢ ↑(↑b.repr m).support ⊆ s

tactic: rwa [← hlm, repr_total, ← Finsupp.mem_supported R l]
state_before: case intro.intro
ι✝ : Type ?u.63088
ι' : Type ?u.63091
R : Type u_2
R₂ : Type ?u.63097
K : Type ?u.63100
M : Type u_3
M' : Type ?u.63106
M'' : Type ?u.63109
V : Type u
V' : Type ?u.63114
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
b✝ b₁ : Basis ι✝ R M
i : ι✝
c : R
x : M
ι : Type u_1
b : Basis ι R M
s : Set ι
m : M
hm : m ∈ span R (↑b '' s)
l : ι →₀ R
hl : l ∈ Finsupp.supported R R s
hlm : ↑(Finsupp.total ι M R ↑b) l = m
⊢ ↑(↑b.repr m).support ⊆ s
Theorem: Polynomial.aeval_algebraMap_apply
File: Mathlib/RingTheory/Polynomial/Tower.lean

tactic: rw [aeval_def, aeval_def, hom_eval₂, ← IsScalarTower.algebraMap_eq]
state_before: R : Type u_1
A : Type u_3
B : Type u_2
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring A
inst✝⁴ : Semiring B
inst✝³ : Algebra R A
inst✝² : Algebra A B
inst✝¹ : Algebra R B
inst✝ : IsScalarTower R A B
x : A
p : R[X]
⊢ ↑(aeval (↑(algebraMap A B) x)) p = ↑(algebraMap A B) (↑(aeval x) p)
Theorem: Irrational.of_sub_rat
File: Mathlib/Data/Real/Irrational.lean

tactic: simpa only [cast_neg, sub_eq_add_neg] using h
state_before: q : ℚ
x y : ℝ
h : Irrational (x - ↑q)
⊢ Irrational (x + ↑(-q))
Theorem: Dfinsupp.mapRange.addEquiv_trans
File: Mathlib/Data/Dfinsupp/Basic.lean

tactic: refine' AddEquiv.ext <| mapRange_comp (fun i x => f₂ i x) (fun i x => f i x) _ _ _
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝² : (i : ι) → AddZeroClass (β i)
inst✝¹ : (i : ι) → AddZeroClass (β₁ i)
inst✝ : (i : ι) → AddZeroClass (β₂ i)
f : (i : ι) → β i ≃+ β₁ i
f₂ : (i : ι) → β₁ i ≃+ β₂ i
⊢ (addEquiv fun i => AddEquiv.trans (f i) (f₂ i)) = AddEquiv.trans (addEquiv f) (addEquiv f₂)

tactic: intros
state_before: case refine'_1
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝² : (i : ι) → AddZeroClass (β i)
inst✝¹ : (i : ι) → AddZeroClass (β₁ i)
inst✝ : (i : ι) → AddZeroClass (β₂ i)
f : (i : ι) → β i ≃+ β₁ i
f₂ : (i : ι) → β₁ i ≃+ β₂ i
⊢ ∀ (i : ι), (fun i x => ↑(f₂ i) x) i 0 = 0

tactic: apply map_zero
state_before: case refine'_1
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝² : (i : ι) → AddZeroClass (β i)
inst✝¹ : (i : ι) → AddZeroClass (β₁ i)
inst✝ : (i : ι) → AddZeroClass (β₂ i)
f : (i : ι) → β i ≃+ β₁ i
f₂ : (i : ι) → β₁ i ≃+ β₂ i
i✝ : ι
⊢ (fun i x => ↑(f₂ i) x) i✝ 0 = 0

tactic: intros
state_before: case refine'_2
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝² : (i : ι) → AddZeroClass (β i)
inst✝¹ : (i : ι) → AddZeroClass (β₁ i)
inst✝ : (i : ι) → AddZeroClass (β₂ i)
f : (i : ι) → β i ≃+ β₁ i
f₂ : (i : ι) → β₁ i ≃+ β₂ i
⊢ ∀ (i : ι), (fun i x => ↑(f i) x) i 0 = 0

tactic: apply map_zero
state_before: case refine'_2
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝² : (i : ι) → AddZeroClass (β i)
inst✝¹ : (i : ι) → AddZeroClass (β₁ i)
inst✝ : (i : ι) → AddZeroClass (β₂ i)
f : (i : ι) → β i ≃+ β₁ i
f₂ : (i : ι) → β₁ i ≃+ β₂ i
i✝ : ι
⊢ (fun i x => ↑(f i) x) i✝ 0 = 0

tactic: intros
state_before: case refine'_3
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝² : (i : ι) → AddZeroClass (β i)
inst✝¹ : (i : ι) → AddZeroClass (β₁ i)
inst✝ : (i : ι) → AddZeroClass (β₂ i)
f : (i : ι) → β i ≃+ β₁ i
f₂ : (i : ι) → β₁ i ≃+ β₂ i
⊢ ∀ (i : ι), ((fun i x => ↑(f₂ i) x) i ∘ (fun i x => ↑(f i) x) i) 0 = 0

tactic: dsimp
state_before: case refine'_3
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝² : (i : ι) → AddZeroClass (β i)
inst✝¹ : (i : ι) → AddZeroClass (β₁ i)
inst✝ : (i : ι) → AddZeroClass (β₂ i)
f : (i : ι) → β i ≃+ β₁ i
f₂ : (i : ι) → β₁ i ≃+ β₂ i
i✝ : ι
⊢ ((fun i x => ↑(f₂ i) x) i✝ ∘ (fun i x => ↑(f i) x) i✝) 0 = 0

tactic: simp only [map_zero]
state_before: case refine'_3
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝² : (i : ι) → AddZeroClass (β i)
inst✝¹ : (i : ι) → AddZeroClass (β₁ i)
inst✝ : (i : ι) → AddZeroClass (β₂ i)
f : (i : ι) → β i ≃+ β₁ i
f₂ : (i : ι) → β₁ i ≃+ β₂ i
i✝ : ι
⊢ ↑(f₂ i✝) (↑(f i✝) 0) = 0
Theorem: Finset.map_refl
File: Mathlib/Data/Finset/Image.lean

tactic: simpa only [mem_map, exists_prop] using exists_eq_right
state_before: α : Type u_1
β : Type ?u.17371
γ : Type ?u.17374
f : α ↪ β
s : Finset α
x✝ : α
⊢ x✝ ∈ map (Embedding.refl α) s ↔ x✝ ∈ s
Theorem: Set.wcovby_insert
File: Mathlib/Order/Cover.lean

tactic: refine' wcovby_of_eq_or_eq (subset_insert x s) fun t hst h2t => _
state_before: α : Type u_1
β : Type ?u.43357
x : α
s : Set α
⊢ s ⩿ insert x s

tactic: by_cases h : x ∈ t
state_before: α : Type u_1
β : Type ?u.43357
x : α
s t : Set α
hst : s ≤ t
h2t : t ≤ insert x s
⊢ t = s ∨ t = insert x s

tactic: exact Or.inr (subset_antisymm h2t <| insert_subset.mpr ⟨h, hst⟩)
state_before: case pos
α : Type u_1
β : Type ?u.43357
x : α
s t : Set α
hst : s ≤ t
h2t : t ≤ insert x s
h : x ∈ t
⊢ t = s ∨ t = insert x s

tactic: refine' Or.inl (subset_antisymm _ hst)
state_before: case neg
α : Type u_1
β : Type ?u.43357
x : α
s t : Set α
hst : s ≤ t
h2t : t ≤ insert x s
h : ¬x ∈ t
⊢ t = s ∨ t = insert x s

tactic: rwa [← diff_singleton_eq_self h, diff_singleton_subset_iff]
state_before: case neg
α : Type u_1
β : Type ?u.43357
x : α
s t : Set α
hst : s ≤ t
h2t : t ≤ insert x s
h : ¬x ∈ t
⊢ t ⊆ s
Theorem: Complex.cos_sq_add_sin_sq
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [add_comm, sin_sq_add_cos_sq]
state_before: x y : ℂ
⊢ cos x ^ 2 + sin x ^ 2 = 1
Theorem: Sym2.other_mem'
File: Mathlib/Data/Sym/Sym2.lean

tactic: rw [← other_eq_other']
state_before: α : Type u_1
β : Type ?u.105502
γ : Type ?u.105505
inst✝ : DecidableEq α
a : α
z : Sym2 α
h : a ∈ z
⊢ Mem.other' h ∈ z

tactic: exact other_mem h
state_before: α : Type u_1
β : Type ?u.105502
γ : Type ?u.105505
inst✝ : DecidableEq α
a : α
z : Sym2 α
h : a ∈ z
⊢ Mem.other h ∈ z
Theorem: ringChar.spec
File: Mathlib/Algebra/CharP/Basic.lean

tactic: letI : CharP R (ringChar R) := (Classical.choose_spec (CharP.exists_unique R)).1
state_before: R : Type u_1
inst✝ : NonAssocSemiring R
⊢ ∀ (x : ℕ), ↑x = 0 ↔ ringChar R ∣ x

tactic: exact CharP.cast_eq_zero_iff R (ringChar R)
state_before: R : Type u_1
inst✝ : NonAssocSemiring R
this : CharP R (ringChar R) := (Classical.choose_spec (CharP.exists_unique R)).left
⊢ ∀ (x : ℕ), ↑x = 0 ↔ ringChar R ∣ x
Theorem: Finset.prod_mul_distrib
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: rw [one_mul]
state_before: ι : Type ?u.321448
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
⊢ ∏ x in s, f x * g x = fold (fun x x_1 => x * x_1) (1 * 1) (fun x => f x * g x) s

tactic: rfl
state_before: ι : Type ?u.321448
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
⊢ ∏ x in s, f x * g x = fold (fun x x_1 => x * x_1) 1 (fun x => f x * g x) s
Theorem: RatFunc.toFractionRingRingEquiv_symm_eq
File: Mathlib/FieldTheory/RatFunc.lean

tactic: ext x
state_before: K : Type u
inst✝¹ : CommRing K
inst✝ : IsDomain K
⊢ RingEquiv.symm (toFractionRingRingEquiv K) =
    AlgEquiv.toRingEquiv (IsLocalization.algEquiv K[X]⁰ (FractionRing K[X]) (RatFunc K))

tactic: simp [toFractionRingRingEquiv, ofFractionRing_eq, AlgEquiv.coe_ringEquiv']
state_before: case h
K : Type u
inst✝¹ : CommRing K
inst✝ : IsDomain K
x : FractionRing K[X]
⊢ ↑(RingEquiv.symm (toFractionRingRingEquiv K)) x =
    ↑(AlgEquiv.toRingEquiv (IsLocalization.algEquiv K[X]⁰ (FractionRing K[X]) (RatFunc K))) x
Theorem: Set.preimage_const_mul_Iic_of_neg
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simpa only [mul_comm] using preimage_mul_const_Iic_of_neg a h
state_before: α : Type u_1
inst✝ : LinearOrderedField α
a✝ a c : α
h : c < 0
⊢ (fun x x_1 => x * x_1) c ⁻¹' Iic a = Ici (a / c)
Theorem: Ideal.isPrime_of_isPrime_prod_top
File: Mathlib/RingTheory/Ideal/Prod.lean

tactic: constructor
state_before: R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : IsPrime (prod I ⊤)
⊢ IsPrime I

tactic: contrapose! h
state_before: case ne_top'
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : IsPrime (prod I ⊤)
⊢ I ≠ ⊤

tactic: rw [h, prod_top_top, isPrime_iff]
state_before: case ne_top'
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : I = ⊤
⊢ ¬IsPrime (prod I ⊤)

tactic: simp [isPrime_iff, h]
state_before: case ne_top'
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : I = ⊤
⊢ ¬(⊤ ≠ ⊤ ∧ ∀ {x y : R × S}, x * y ∈ ⊤ → x ∈ ⊤ ∨ y ∈ ⊤)

tactic: intro x y hxy
state_before: case mem_or_mem'
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : IsPrime (prod I ⊤)
⊢ ∀ {x y : R}, x * y ∈ I → x ∈ I ∨ y ∈ I

tactic: have : (⟨x, 1⟩ : R × S) * ⟨y, 1⟩ ∈ prod I ⊤ := by
  rw [Prod.mk_mul_mk, mul_one, mem_prod]
  exact ⟨hxy, trivial⟩
state_before: case mem_or_mem'
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : IsPrime (prod I ⊤)
x y : R
hxy : x * y ∈ I
⊢ x ∈ I ∨ y ∈ I

tactic: simpa using h.mem_or_mem this
state_before: case mem_or_mem'
R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : IsPrime (prod I ⊤)
x y : R
hxy : x * y ∈ I
this : (x, 1) * (y, 1) ∈ prod I ⊤
⊢ x ∈ I ∨ y ∈ I

tactic: rw [Prod.mk_mul_mk, mul_one, mem_prod]
state_before: R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : IsPrime (prod I ⊤)
x y : R
hxy : x * y ∈ I
⊢ (x, 1) * (y, 1) ∈ prod I ⊤

tactic: exact ⟨hxy, trivial⟩
state_before: R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : IsPrime (prod I ⊤)
x y : R
hxy : x * y ∈ I
⊢ x * y ∈ I ∧ 1 ∈ ⊤
Theorem: TypeVec.dropFun_of_subtype
File: Mathlib/Data/TypeVec.lean

tactic: ext i : 2
state_before: n : ℕ
α : TypeVec (n + 1)
p : α ⟹ repeat (n + 1) Prop
⊢ dropFun (ofSubtype p) = ofSubtype (dropFun p)

tactic: induction i <;> simp [dropFun, *] <;> rfl
state_before: case a.h
n : ℕ
α : TypeVec (n + 1)
p : α ⟹ repeat (n + 1) Prop
i : Fin2 n
x✝ : drop (Subtype_ p) i
⊢ dropFun (ofSubtype p) i x✝ = ofSubtype (dropFun p) i x✝
Theorem: Finset.nonempty_mk
File: Mathlib/Data/Finset/Basic.lean

tactic: induction m using Multiset.induction_on <;> simp
state_before: α : Type u_1
β : Type ?u.38587
γ : Type ?u.38590
s t : Finset α
a b : α
m : Multiset α
hm : Nodup m
⊢ Finset.Nonempty { val := m, nodup := hm } ↔ m ≠ 0
Theorem: NonUnitalAlgHom.mk_coe
File: Mathlib/Algebra/Hom/NonUnitalAlg.lean

tactic: rfl
state_before: R : Type u
A : Type v
B : Type w
C : Type w₁
inst✝⁶ : Monoid R
inst✝⁵ : NonUnitalNonAssocSemiring A
inst✝⁴ : DistribMulAction R A
inst✝³ : NonUnitalNonAssocSemiring B
inst✝² : DistribMulAction R B
inst✝¹ : NonUnitalNonAssocSemiring C
inst✝ : DistribMulAction R C
f : A →ₙₐ[R] B
h₁ : ∀ (m : R) (x : A), ↑f (m • x) = m • ↑f x
h₂ : MulActionHom.toFun { toFun := ↑f, map_smul' := h₁ } 0 = 0
h₃ :
  ∀ (x y : A),
    MulActionHom.toFun { toFun := ↑f, map_smul' := h₁ } (x + y) =
      MulActionHom.toFun { toFun := ↑f, map_smul' := h₁ } x + MulActionHom.toFun { toFun := ↑f, map_smul' := h₁ } y
h₄ :
  ∀ (x y : A),
    MulActionHom.toFun
        { toMulActionHom := { toFun := ↑f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }.toMulActionHom (x * y) =
      MulActionHom.toFun
          { toMulActionHom := { toFun := ↑f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }.toMulActionHom x *
        MulActionHom.toFun
          { toMulActionHom := { toFun := ↑f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ }.toMulActionHom y
⊢ { toDistribMulActionHom := { toMulActionHom := { toFun := ↑f, map_smul' := h₁ }, map_zero' := h₂, map_add' := h₃ },
      map_mul' := h₄ } =
    f
Theorem: Real.mul_self_sqrt
File: Mathlib/Data/Real/Sqrt.lean

tactic: rw [sqrt, ← NNReal.coe_mul, NNReal.mul_self_sqrt, Real.coe_toNNReal _ h]
state_before: x y : ℝ
h : 0 ≤ x
⊢ sqrt x * sqrt x = x
Theorem: LipschitzWith.dist_iterate_succ_le_geometric
File: Mathlib/Topology/MetricSpace/Lipschitz.lean

tactic: rw [iterate_succ, mul_comm]
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoMetricSpace α
inst✝¹ : PseudoMetricSpace β
inst✝ : PseudoMetricSpace γ
K : ℝ≥0
f✝ : α → β
x✝ y : α
r : ℝ
f : α → α
hf : LipschitzWith K f
x : α
n : ℕ
⊢ dist ((f^[n]) x) ((f^[n + 1]) x) ≤ dist x (f x) * ↑K ^ n

tactic: simpa only [NNReal.coe_pow] using (hf.iterate n).dist_le_mul x (f x)
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoMetricSpace α
inst✝¹ : PseudoMetricSpace β
inst✝ : PseudoMetricSpace γ
K : ℝ≥0
f✝ : α → β
x✝ y : α
r : ℝ
f : α → α
hf : LipschitzWith K f
x : α
n : ℕ
⊢ dist ((f^[n]) x) ((f^[n] ∘ f) x) ≤ ↑K ^ n * dist x (f x)
Theorem: CstarRing.star_mul_self_eq_zero_iff
File: Mathlib/Analysis/NormedSpace/Star/Basic.lean

tactic: rw [← norm_eq_zero, norm_star_mul_self]
state_before: 𝕜 : Type ?u.40337
E : Type u_1
α : Type ?u.40343
inst✝² : NonUnitalNormedRing E
inst✝¹ : StarRing E
inst✝ : CstarRing E
x : E
⊢ x⋆ * x = 0 ↔ x = 0

tactic: exact mul_self_eq_zero.trans norm_eq_zero
state_before: 𝕜 : Type ?u.40337
E : Type u_1
α : Type ?u.40343
inst✝² : NonUnitalNormedRing E
inst✝¹ : StarRing E
inst✝ : CstarRing E
x : E
⊢ ‖x‖ * ‖x‖ = 0 ↔ x = 0
Theorem: Hyperreal.infinitesimal_neg_iff_infiniteNeg_inv
File: Mathlib/Data/Real/Hyperreal.lean

tactic: rw [inv_inv]
state_before: x : ℝ*
⊢ Infinitesimal x⁻¹⁻¹ ∧ x⁻¹⁻¹ < 0 ↔ Infinitesimal x ∧ x < 0
Theorem: FirstOrder.Language.BoundedFormula.semanticallyEquivalent_all_liftAt
File: Mathlib/ModelTheory/Satisfiability.lean

tactic: skip
state_before: L : Language
T : Theory L
α : Type w
n : ℕ
φ ψ : BoundedFormula L α n
M : Theory.ModelType T
v : α → ↑M
xs : Fin n → ↑M
⊢ Realize (φ ⇔ ∀'liftAt 1 n φ) v xs

tactic: rw [realize_iff, realize_all_liftAt_one_self]
state_before: L : Language
T : Theory L
α : Type w
n : ℕ
φ ψ : BoundedFormula L α n
M : Theory.ModelType T
v : α → ↑M
xs : Fin n → ↑M
⊢ Realize (φ ⇔ ∀'liftAt 1 n φ) v xs
Theorem: Quaternion.mul_imK
File: Mathlib/Algebra/Quaternion.lean

tactic: simp only [one_mul, neg_mul, sub_eq_add_neg, neg_neg]
state_before: S : Type ?u.423313
T : Type ?u.423316
R : Type u_1
inst✝ : CommRing R
r x y z : R
a b c : ℍ[R]
⊢ a.re * b.imK + a.imI * b.imJ - a.imJ * b.imI + a.imK * b.re =
    a.re * b.imK + a.imI * b.imJ - a.imJ * b.imI + a.imK * b.re
Theorem: Holor.cast_type
File: Mathlib/Data/Holor.lean

tactic: subst eq
state_before: α : Type
d : ℕ
ds ds₁ ds₂ ds₃ : List ℕ
eq : ds₁ = ds₂
a : Holor α ds₁
⊢ cast (_ : Holor α ds₁ = Holor α ds₂) a = fun t => a (cast (_ : HolorIndex ds₂ = HolorIndex ds₁) t)

tactic: rfl
state_before: α : Type
d : ℕ
ds ds₁ ds₃ : List ℕ
a : Holor α ds₁
⊢ cast (_ : Holor α ds₁ = Holor α ds₁) a = fun t => a (cast (_ : HolorIndex ds₁ = HolorIndex ds₁) t)
Theorem: CategoryTheory.Biprod.inr_ofComponents
File: Mathlib/CategoryTheory/Preadditive/Biproducts.lean

tactic: simp [Biprod.ofComponents]
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Preadditive C
inst✝ : HasBinaryBiproducts C
X₁ X₂ Y₁ Y₂ : C
f₁₁ : X₁ ⟶ Y₁
f₁₂ : X₁ ⟶ Y₂
f₂₁ : X₂ ⟶ Y₁
f₂₂ : X₂ ⟶ Y₂
⊢ biprod.inr ≫ ofComponents f₁₁ f₁₂ f₂₁ f₂₂ = f₂₁ ≫ biprod.inl + f₂₂ ≫ biprod.inr
Theorem: List.foldl_eq_of_comm'
File: Mathlib/Data/List/Basic.lean

tactic: rw [foldl, foldl, foldl, ← foldl_eq_of_comm' .., foldl, hf]
state_before: ι : Type ?u.250190
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → β → α
hf : ∀ (a : α) (b c : β), f (f a b) c = f (f a c) b
a : α
b c : β
l : List β
⊢ foldl f a (b :: c :: l) = f (foldl f a (c :: l)) b
Theorem: TrivSqZeroExt.nhds_def
File: Mathlib/Topology/Instances/TrivSqZeroExt.lean

tactic: cases x
state_before: α : Type ?u.7776
S : Type ?u.7779
R : Type u_1
M : Type u_2
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSpace M
x : tsze R M
⊢ nhds x = Filter.prod (nhds (fst x)) (nhds (snd x))

tactic: exact nhds_prod_eq
state_before: case mk
α : Type ?u.7776
S : Type ?u.7779
R : Type u_1
M : Type u_2
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSpace M
fst✝ : R
snd✝ : M
⊢ nhds (fst✝, snd✝) = Filter.prod (nhds (fst (fst✝, snd✝))) (nhds (snd (fst✝, snd✝)))
Theorem: TopologicalSpace.Opens.map_iSup
File: Mathlib/Topology/Category/TopCat/Opens.lean

tactic: ext1
state_before: X Y Z : TopCat
f : X ⟶ Y
ι : Type u_1
U : ι → Opens ↑Y
⊢ (map f).obj (iSup U) = iSup ((map f).toPrefunctor.obj ∘ U)

tactic: rw [iSup_def, iSup_def, map_obj]
state_before: case h
X Y Z : TopCat
f : X ⟶ Y
ι : Type u_1
U : ι → Opens ↑Y
⊢ ↑((map f).obj (iSup U)) = ↑(iSup ((map f).toPrefunctor.obj ∘ U))

tactic: dsimp
state_before: case h
X Y Z : TopCat
f : X ⟶ Y
ι : Type u_1
U : ι → Opens ↑Y
⊢ ↑{ carrier := (forget TopCat).map f ⁻¹' ⋃ (i : ι), ↑(U i), is_open' := (_ : IsOpen (↑f ⁻¹' ⋃ (i : ι), ↑(U i))) } =
    ↑{ carrier := ⋃ (i : ι), ↑(((map f).toPrefunctor.obj ∘ U) i),
        is_open' := (_ : IsOpen (⋃ (i : ι), ↑(((map f).toPrefunctor.obj ∘ U) i))) }

tactic: rw [Set.preimage_iUnion]
state_before: case h
X Y Z : TopCat
f : X ⟶ Y
ι : Type u_1
U : ι → Opens ↑Y
⊢ ((forget TopCat).map f ⁻¹' ⋃ (i : ι), ↑(U i)) = ⋃ (i : ι), ↑((map f).obj (U i))

tactic: rfl
state_before: case h
X Y Z : TopCat
f : X ⟶ Y
ι : Type u_1
U : ι → Opens ↑Y
⊢ (⋃ (i : ι), (forget TopCat).map f ⁻¹' ↑(U i)) = ⋃ (i : ι), ↑((map f).obj (U i))
Theorem: Array.size_swap!
File: Std/Data/Array/Lemmas.lean

tactic: simp [swap!, hi, hj]
state_before: α : Type u_1
a : Array α
i j : Nat
hi : i < size a
hj : j < size a
⊢ size (swap! a i j) = size a
Theorem: Nat.floor_sub_nat
File: Mathlib/Algebra/Order/Floor.lean

tactic: obtain ha | ha := le_total a 0
state_before: F : Type ?u.83262
α : Type u_1
β : Type ?u.83268
inst✝⁴ : LinearOrderedSemiring α
inst✝³ : FloorSemiring α
a✝ : α
n✝ : ℕ
inst✝² : Sub α
inst✝¹ : OrderedSub α
inst✝ : ExistsAddOfLE α
a : α
n : ℕ
⊢ ⌊a - ↑n⌋₊ = ⌊a⌋₊ - n

tactic: cases' le_total a n with h h
state_before: case inr
F : Type ?u.83262
α : Type u_1
β : Type ?u.83268
inst✝⁴ : LinearOrderedSemiring α
inst✝³ : FloorSemiring α
a✝ : α
n✝ : ℕ
inst✝² : Sub α
inst✝¹ : OrderedSub α
inst✝ : ExistsAddOfLE α
a : α
n : ℕ
ha : 0 ≤ a
⊢ ⌊a - ↑n⌋₊ = ⌊a⌋₊ - n

tactic: rw [floor_of_nonpos ha, floor_of_nonpos (tsub_nonpos_of_le (ha.trans n.cast_nonneg)), zero_tsub]
state_before: case inl
F : Type ?u.83262
α : Type u_1
β : Type ?u.83268
inst✝⁴ : LinearOrderedSemiring α
inst✝³ : FloorSemiring α
a✝ : α
n✝ : ℕ
inst✝² : Sub α
inst✝¹ : OrderedSub α
inst✝ : ExistsAddOfLE α
a : α
n : ℕ
ha : a ≤ 0
⊢ ⌊a - ↑n⌋₊ = ⌊a⌋₊ - n

tactic: rw [floor_of_nonpos (tsub_nonpos_of_le h), eq_comm, tsub_eq_zero_iff_le]
state_before: case inr.inl
F : Type ?u.83262
α : Type u_1
β : Type ?u.83268
inst✝⁴ : LinearOrderedSemiring α
inst✝³ : FloorSemiring α
a✝ : α
n✝ : ℕ
inst✝² : Sub α
inst✝¹ : OrderedSub α
inst✝ : ExistsAddOfLE α
a : α
n : ℕ
ha : 0 ≤ a
h : a ≤ ↑n
⊢ ⌊a - ↑n⌋₊ = ⌊a⌋₊ - n

tactic: exact Nat.cast_le.1 ((Nat.floor_le ha).trans h)
state_before: case inr.inl
F : Type ?u.83262
α : Type u_1
β : Type ?u.83268
inst✝⁴ : LinearOrderedSemiring α
inst✝³ : FloorSemiring α
a✝ : α
n✝ : ℕ
inst✝² : Sub α
inst✝¹ : OrderedSub α
inst✝ : ExistsAddOfLE α
a : α
n : ℕ
ha : 0 ≤ a
h : a ≤ ↑n
⊢ ⌊a⌋₊ ≤ n

tactic: rw [eq_tsub_iff_add_eq_of_le (le_floor h), ← floor_add_nat _, tsub_add_cancel_of_le h]
state_before: case inr.inr
F : Type ?u.83262
α : Type u_1
β : Type ?u.83268
inst✝⁴ : LinearOrderedSemiring α
inst✝³ : FloorSemiring α
a✝ : α
n✝ : ℕ
inst✝² : Sub α
inst✝¹ : OrderedSub α
inst✝ : ExistsAddOfLE α
a : α
n : ℕ
ha : 0 ≤ a
h : ↑n ≤ a
⊢ ⌊a - ↑n⌋₊ = ⌊a⌋₊ - n

tactic: exact le_tsub_of_add_le_left ((add_zero _).trans_le h)
state_before: F : Type ?u.83262
α : Type u_1
β : Type ?u.83268
inst✝⁴ : LinearOrderedSemiring α
inst✝³ : FloorSemiring α
a✝ : α
n✝ : ℕ
inst✝² : Sub α
inst✝¹ : OrderedSub α
inst✝ : ExistsAddOfLE α
a : α
n : ℕ
ha : 0 ≤ a
h : ↑n ≤ a
⊢ 0 ≤ a - ↑n
Theorem: Multiset.mem_Ico
File: Mathlib/Order/LocallyFinite.lean

tactic: rw [Ico, ← Finset.mem_def, Finset.mem_Ico]
state_before: α : Type u_1
β : Type ?u.32406
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a b x : α
⊢ x ∈ Ico a b ↔ a ≤ x ∧ x < b
Theorem: finSuccEquiv'_last_apply_castSucc
File: Mathlib/Logic/Equiv/Fin.lean

tactic: rw [← Fin.succAbove_last, finSuccEquiv'_succAbove]
state_before: m n : ℕ
i : Fin n
⊢ ↑(finSuccEquiv' (Fin.last n)) (↑Fin.castSucc i) = some i