ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: EuclideanGeometry.orthogonalProjectionFn_mem_orthogonal
File: Mathlib/Geometry/Euclidean/Basic.lean

Proof steps:
state_before: V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty ↥s
inst✝ : HasOrthogonalProjection s.direction
p : P
⊢ orthogonalProjectionFn s p ∈ mk' p s.directionᗮ
state_after: V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty ↥s
inst✝ : HasOrthogonalProjection s.direction
p : P
⊢ ↑s ∩ ↑(mk' p s.directionᗮ) ⊆ ↑(mk' p s.directionᗮ)
tactic: rw [← mem_coe, ← Set.singleton_subset_iff, ← inter_eq_singleton_orthogonalProjectionFn]
state_before: V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty ↥s
inst✝ : HasOrthogonalProjection s.direction
p : P
⊢ ↑s ∩ ↑(mk' p s.directionᗮ) ⊆ ↑(mk' p s.directionᗮ)
state_after: no goals
tactic: exact Set.inter_subset_right
Theorem: Nat.filter_multiset_Ico_card_eq_of_periodic
File: Mathlib/Data/Nat/Periodic.lean

Proof steps:
state_before: n a : ℕ
p : ℕ → Prop
inst✝ : DecidablePred p
pp : Periodic p a
⊢ card (filter p (Ico n (n + a))) = count p a
state_after: n a : ℕ
p : ℕ → Prop
inst✝ : DecidablePred p
pp : Periodic p a
⊢ Multiset.count True (map p (Ico n (n + a))) = Multiset.count True (map (p ∘ fun x => x % a) (Ico n (n + a)))
tactic: rw [count_eq_card_filter_range, Finset.card, Finset.filter_val, Finset.range_val, ←
    multiset_Ico_map_mod n, ← map_count_True_eq_filter_card, ← map_count_True_eq_filter_card,
    map_map]
state_before: n a : ℕ
p : ℕ → Prop
inst✝ : DecidablePred p
pp : Periodic p a
⊢ Multiset.count True (map p (Ico n (n + a))) = Multiset.count True (map (p ∘ fun x => x % a) (Ico n (n + a)))
state_after: case e_a.e_f
n a : ℕ
p : ℕ → Prop
inst✝ : DecidablePred p
pp : Periodic p a
⊢ p = p ∘ fun x => x % a
tactic: congr
state_before: case e_a.e_f
n a : ℕ
p : ℕ → Prop
inst✝ : DecidablePred p
pp : Periodic p a
⊢ p = p ∘ fun x => x % a
state_after: case e_a.e_f.h
n✝ a : ℕ
p : ℕ → Prop
inst✝ : DecidablePred p
pp : Periodic p a
n : ℕ
⊢ p n = (p ∘ fun x => x % a) n
tactic: funext n
state_before: case e_a.e_f.h
n✝ a : ℕ
p : ℕ → Prop
inst✝ : DecidablePred p
pp : Periodic p a
n : ℕ
⊢ p n = (p ∘ fun x => x % a) n
state_after: no goals
tactic: exact (Function.Periodic.map_mod_nat pp n).symm
Theorem: SetTheory.PGame.Numeric.moveRight
File: Mathlib/SetTheory/Surreal/Basic.lean

Proof steps:
state_before: x : PGame
o : x.Numeric
j : x.RightMoves
⊢ (x.moveRight j).Numeric
state_after: case mk
α✝ β✝ : Type u_1
a✝¹ : α✝ → PGame
a✝ : β✝ → PGame
o : (PGame.mk α✝ β✝ a✝¹ a✝).Numeric
j : (PGame.mk α✝ β✝ a✝¹ a✝).RightMoves
⊢ ((PGame.mk α✝ β✝ a✝¹ a✝).moveRight j).Numeric
tactic: cases x
state_before: case mk
α✝ β✝ : Type u_1
a✝¹ : α✝ → PGame
a✝ : β✝ → PGame
o : (PGame.mk α✝ β✝ a✝¹ a✝).Numeric
j : (PGame.mk α✝ β✝ a✝¹ a✝).RightMoves
⊢ ((PGame.mk α✝ β✝ a✝¹ a✝).moveRight j).Numeric
state_after: no goals
tactic: exact o.2.2 j
Theorem: Polynomial.taylor_X
File: Mathlib/Algebra/Polynomial/Taylor.lean

Proof steps:
state_before: R : Type u_1
inst✝ : Semiring R
r : R
f : R[X]
⊢ (taylor r) X = X + C r
state_after: no goals
tactic: simp only [taylor_apply, X_comp]
Theorem: MulAction.pow_add_period_smul
File: Mathlib/Dynamics/PeriodicPts.lean

Proof steps:
state_before: α : Type v
G : Type u
inst✝³ : Group G
inst✝² : MulAction G α
M : Type u
inst✝¹ : Monoid M
inst✝ : MulAction M α
n : ℕ
m : M
a : α
⊢ m ^ (n + period m a) • a = m ^ n • a
state_after: no goals
tactic: rw [← pow_mod_period_smul, Nat.add_mod_right, pow_mod_period_smul]
Theorem: Finset.exists_subset_card_eq
File: Mathlib/Data/Finset/Card.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
hns : n ≤ s.card
⊢ ∃ t ⊆ s, t.card = n
state_after: no goals
tactic: simpa using exists_subsuperset_card_eq s.empty_subset (by simp) hns
Theorem: Matrix.StdBasisMatrix.mul_right_apply_same
File: Mathlib/Data/Matrix/Basis.lean

Proof steps:
state_before: l : Type u_1
m : Type u_2
n : Type u_3
R : Type u_4
α : Type u_5
inst✝⁴ : DecidableEq l
inst✝³ : DecidableEq m
inst✝² : DecidableEq n
inst✝¹ : Semiring α
i j : n
c : α
i' j' : n
inst✝ : Fintype n
a : n
M : Matrix n n α
⊢ (M * stdBasisMatrix i j c) a j = M a i * c
state_after: no goals
tactic: simp [mul_apply, stdBasisMatrix, mul_comm]
Theorem: IsMulCentral.right_comm
File: Mathlib/Algebra/Group/Center.lean

Proof steps:
state_before: M : Type u_1
S T : Set M
a✝ b✝ c : M
inst✝ : Mul M
h : IsMulCentral c
a b : M
⊢ a * b * c = a * c * b
state_after: no goals
tactic: simp only [h.right_assoc, h.mid_assoc, h.comm]
Theorem: hnot_le_iff_codisjoint_right
File: Mathlib/Order/Heyting/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : CoheytingAlgebra α
a b c : α
⊢ ￢a ≤ b ↔ Codisjoint a b
state_after: no goals
tactic: rw [← top_sdiff', sdiff_le_iff, codisjoint_iff_le_sup]
Theorem: EMetric.disjoint_closedBall_of_lt_infEdist
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

Proof steps:
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t : Set α
Φ : α → β
r : ℝ≥0∞
h : r < infEdist x s
⊢ Disjoint (closedBall x r) s
state_after: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t : Set α
Φ : α → β
r : ℝ≥0∞
h : r < infEdist x s
⊢ ∀ ⦃a : α⦄, a ∈ closedBall x r → a ∉ s
tactic: rw [disjoint_left]
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t : Set α
Φ : α → β
r : ℝ≥0∞
h : r < infEdist x s
⊢ ∀ ⦃a : α⦄, a ∈ closedBall x r → a ∉ s
state_after: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y✝ : α
s t : Set α
Φ : α → β
r : ℝ≥0∞
h : r < infEdist x s
y : α
hy : y ∈ closedBall x r
h'y : y ∈ s
⊢ False
tactic: intro y hy h'y
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y✝ : α
s t : Set α
Φ : α → β
r : ℝ≥0∞
h : r < infEdist x s
y : α
hy : y ∈ closedBall x r
h'y : y ∈ s
⊢ False
state_after: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y✝ : α
s t : Set α
Φ : α → β
r : ℝ≥0∞
h : r < infEdist x s
y : α
hy : y ∈ closedBall x r
h'y : y ∈ s
⊢ infEdist x s < infEdist x s
tactic: apply lt_irrefl (infEdist x s)
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y✝ : α
s t : Set α
Φ : α → β
r : ℝ≥0∞
h : r < infEdist x s
y : α
hy : y ∈ closedBall x r
h'y : y ∈ s
⊢ infEdist x s < infEdist x s
state_after: no goals
tactic: calc
    infEdist x s ≤ edist x y := infEdist_le_edist_of_mem h'y
    _ ≤ r := by rwa [mem_closedBall, edist_comm] at hy
    _ < infEdist x s := h
Theorem: PFun.fix_fwd_eq
File: Mathlib/Data/PFun.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ι : Type u_6
f : α →. β ⊕ α
a a' : α
ha' : Sum.inr a' ∈ f a
⊢ f.fix a = f.fix a'
state_after: case H
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ι : Type u_6
f : α →. β ⊕ α
a a' : α
ha' : Sum.inr a' ∈ f a
b : β
⊢ b ∈ f.fix a ↔ b ∈ f.fix a'
tactic: ext b
state_before: case H
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ι : Type u_6
f : α →. β ⊕ α
a a' : α
ha' : Sum.inr a' ∈ f a
b : β
⊢ b ∈ f.fix a ↔ b ∈ f.fix a'
state_after: case H.mp
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ι : Type u_6
f : α →. β ⊕ α
a a' : α
ha' : Sum.inr a' ∈ f a
b : β
⊢ b ∈ f.fix a → b ∈ f.fix a'

case H.mpr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ι : Type u_6
f : α →. β ⊕ α
a a' : α
ha' : Sum.inr a' ∈ f a
b : β
⊢ b ∈ f.fix a' → b ∈ f.fix a
tactic: constructor
Theorem: Polynomial.eval₂_at_zero
File: Mathlib/Algebra/Polynomial/Eval.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : Semiring S
f : R →+* S
x : S
⊢ eval₂ f 0 p = f (p.coeff 0)
state_after: no goals
tactic: simp (config := { contextual := true }) only [eval₂_eq_sum, zero_pow_eq, mul_ite, mul_zero,
    mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff,
    RingHom.map_zero, imp_true_iff, eq_self_iff_true]
Theorem: Option.exists_ne_none
File: Mathlib/Data/Option/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
p : Option α → Prop
⊢ (∃ x, x ≠ none ∧ p x) ↔ ∃ x, p (some x)
state_after: no goals
tactic: simp only [← exists_prop, bex_ne_none]
Theorem: HomologicalComplex₂.total.map_id
File: Mathlib/Algebra/Homology/TotalComplex.lean

Proof steps:
state_before: C : Type u_1
inst✝⁵ : Category.{u_5, u_1} C
inst✝⁴ : Preadditive C
I₁ : Type u_2
I₂ : Type u_3
I₁₂ : Type u_4
c₁ : ComplexShape I₁
c₂ : ComplexShape I₂
K L M : HomologicalComplex₂ C c₁ c₂
φ : K ⟶ L
e : K ≅ L
ψ : L ⟶ M
c₁₂ : ComplexShape I₁₂
inst✝³ : DecidableEq I₁₂
inst✝² : TotalComplexShape c₁ c₂ c₁₂
inst✝¹ : K.HasTotal c₁₂
inst✝ : L.HasTotal c₁₂
⊢ map (𝟙 K) c₁₂ = 𝟙 (K.total c₁₂)
state_after: case a
C : Type u_1
inst✝⁵ : Category.{u_5, u_1} C
inst✝⁴ : Preadditive C
I₁ : Type u_2
I₂ : Type u_3
I₁₂ : Type u_4
c₁ : ComplexShape I₁
c₂ : ComplexShape I₂
K L M : HomologicalComplex₂ C c₁ c₂
φ : K ⟶ L
e : K ≅ L
ψ : L ⟶ M
c₁₂ : ComplexShape I₁₂
inst✝³ : DecidableEq I₁₂
inst✝² : TotalComplexShape c₁ c₂ c₁₂
inst✝¹ : K.HasTotal c₁₂
inst✝ : L.HasTotal c₁₂
⊢ (HomologicalComplex.forget C c₁₂).map (map (𝟙 K) c₁₂) = (HomologicalComplex.forget C c₁₂).map (𝟙 (K.total c₁₂))
tactic: apply (HomologicalComplex.forget _ _).map_injective
state_before: case a
C : Type u_1
inst✝⁵ : Category.{u_5, u_1} C
inst✝⁴ : Preadditive C
I₁ : Type u_2
I₂ : Type u_3
I₁₂ : Type u_4
c₁ : ComplexShape I₁
c₂ : ComplexShape I₂
K L M : HomologicalComplex₂ C c₁ c₂
φ : K ⟶ L
e : K ≅ L
ψ : L ⟶ M
c₁₂ : ComplexShape I₁₂
inst✝³ : DecidableEq I₁₂
inst✝² : TotalComplexShape c₁ c₂ c₁₂
inst✝¹ : K.HasTotal c₁₂
inst✝ : L.HasTotal c₁₂
⊢ (HomologicalComplex.forget C c₁₂).map (map (𝟙 K) c₁₂) = (HomologicalComplex.forget C c₁₂).map (𝟙 (K.total c₁₂))
state_after: no goals
tactic: apply GradedObject.mapMap_id
Theorem: HasCompactMulSupport.exists_pos_le_norm
File: Mathlib/Analysis/Normed/Group/Bounded.lean

Proof steps:
state_before: α : Type u_1
ι : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
inst✝¹ : NormedAddGroup α
f : α → E
inst✝ : One E
hf : HasCompactMulSupport f
⊢ ∃ R, 0 < R ∧ ∀ (x : α), R ≤ ‖x‖ → f x = 1
state_after: case intro.intro
α : Type u_1
ι : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
inst✝¹ : NormedAddGroup α
f : α → E
inst✝ : One E
hf : HasCompactMulSupport f
K : Set α
hK1 : IsCompact K
hK2 : ∀ x ∉ K, f x = 1
⊢ ∃ R, 0 < R ∧ ∀ (x : α), R ≤ ‖x‖ → f x = 1
tactic: obtain ⟨K, ⟨hK1, hK2⟩⟩ := exists_compact_iff_hasCompactMulSupport.mpr hf
state_before: case intro.intro
α : Type u_1
ι : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
inst✝¹ : NormedAddGroup α
f : α → E
inst✝ : One E
hf : HasCompactMulSupport f
K : Set α
hK1 : IsCompact K
hK2 : ∀ x ∉ K, f x = 1
⊢ ∃ R, 0 < R ∧ ∀ (x : α), R ≤ ‖x‖ → f x = 1
state_after: case intro.intro.intro.intro
α : Type u_1
ι : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
inst✝¹ : NormedAddGroup α
f : α → E
inst✝ : One E
hf : HasCompactMulSupport f
K : Set α
hK1 : IsCompact K
hK2 : ∀ x ∉ K, f x = 1
S : ℝ
hS : S > 0
hS' : ∀ x ∈ K, ‖x‖ ≤ S
⊢ ∃ R, 0 < R ∧ ∀ (x : α), R ≤ ‖x‖ → f x = 1
tactic: obtain ⟨S, hS, hS'⟩ := hK1.isBounded.exists_pos_norm_le
state_before: case intro.intro.intro.intro
α : Type u_1
ι : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
inst✝¹ : NormedAddGroup α
f : α → E
inst✝ : One E
hf : HasCompactMulSupport f
K : Set α
hK1 : IsCompact K
hK2 : ∀ x ∉ K, f x = 1
S : ℝ
hS : S > 0
hS' : ∀ x ∈ K, ‖x‖ ≤ S
⊢ ∃ R, 0 < R ∧ ∀ (x : α), R ≤ ‖x‖ → f x = 1
state_after: case intro.intro.intro.intro
α : Type u_1
ι : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
inst✝¹ : NormedAddGroup α
f : α → E
inst✝ : One E
hf : HasCompactMulSupport f
K : Set α
hK1 : IsCompact K
hK2 : ∀ x ∉ K, f x = 1
S : ℝ
hS : S > 0
hS' : ∀ x ∈ K, ‖x‖ ≤ S
x : α
hx : S + 1 ≤ ‖x‖
⊢ ¬‖x‖ ≤ S
tactic: refine ⟨S + 1, by positivity, fun x hx => hK2 x ((mt <| hS' x) ?_)⟩
state_before: case intro.intro.intro.intro
α : Type u_1
ι : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
inst✝¹ : NormedAddGroup α
f : α → E
inst✝ : One E
hf : HasCompactMulSupport f
K : Set α
hK1 : IsCompact K
hK2 : ∀ x ∉ K, f x = 1
S : ℝ
hS : S > 0
hS' : ∀ x ∈ K, ‖x‖ ≤ S
x : α
hx : S + 1 ≤ ‖x‖
⊢ ¬‖x‖ ≤ S
state_after: case intro.intro.intro.intro
α : Type u_1
ι : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
inst✝¹ : NormedAddGroup α
f : α → E
inst✝ : One E
hf : HasCompactMulSupport f
K : Set α
hK1 : IsCompact K
hK2 : ∀ x ∉ K, f x = 1
S : ℝ
hS : S > 0
hS' : ∀ x ∈ K, ‖x‖ ≤ S
x : α
hx : ‖x‖ ≤ S
⊢ ‖x‖ < S + 1
tactic: contrapose! hx
state_before: case intro.intro.intro.intro
α : Type u_1
ι : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
inst✝¹ : NormedAddGroup α
f : α → E
inst✝ : One E
hf : HasCompactMulSupport f
K : Set α
hK1 : IsCompact K
hK2 : ∀ x ∉ K, f x = 1
S : ℝ
hS : S > 0
hS' : ∀ x ∈ K, ‖x‖ ≤ S
x : α
hx : ‖x‖ ≤ S
⊢ ‖x‖ < S + 1
state_after: no goals
tactic: exact lt_add_of_le_of_pos hx zero_lt_one
Theorem: DiscreteQuotient.LEComap.comp
File: Mathlib/Topology/DiscreteQuotient.lean

Proof steps:
state_before: α : Type u_1
X : Type u_2
Y : Type u_3
Z : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
S : DiscreteQuotient X
f : C(X, Y)
A A' : DiscreteQuotient X
B B' : DiscreteQuotient Y
g : C(Y, Z)
C : DiscreteQuotient Z
⊢ LEComap g B C → LEComap f A B → LEComap (g.comp f) A C
state_after: no goals
tactic: tauto
Theorem: ZMod.inv_zero
File: Mathlib/Data/ZMod/Basic.lean

Proof steps:
state_before: m n✝ n : ℕ
⊢ ↑((val 0).gcdA (n + 1)) = 0
state_after: m n✝ n : ℕ
⊢ ↑(Nat.gcdA 0 (n + 1)) = 0
tactic: rw [val_zero]
state_before: m n✝ n : ℕ
⊢ ↑(Nat.gcdA 0 (n + 1)) = 0
state_after: m n✝ n : ℕ
⊢ ↑(n + 1, 0, 1).2.1 = 0
tactic: unfold Nat.gcdA Nat.xgcd Nat.xgcdAux
state_before: m n✝ n : ℕ
⊢ ↑(n + 1, 0, 1).2.1 = 0
state_after: no goals
tactic: rfl
Theorem: IsLocalization.ne_zero_of_mk'_ne_zero
File: Mathlib/RingTheory/Localization/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
x : R
y : ↥M
hxy : mk' S x y ≠ 0
⊢ x ≠ 0
state_after: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
y : ↥M
hxy : mk' S 0 y ≠ 0
⊢ False
tactic: rintro rfl
state_before: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
y : ↥M
hxy : mk' S 0 y ≠ 0
⊢ False
state_after: no goals
tactic: exact hxy (IsLocalization.mk'_zero _)
Theorem: Matrix.charmatrix_apply_natDegree
File: Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean

Proof steps:
state_before: R : Type u
inst✝⁴ : CommRing R
n G : Type v
inst✝³ : DecidableEq n
inst✝² : Fintype n
α β : Type v
inst✝¹ : DecidableEq α
M : Matrix n n R
inst✝ : Nontrivial R
i j : n
⊢ (M.charmatrix i j).natDegree = if i = j then 1 else 0
state_after: no goals
tactic: by_cases h : i = j <;> simp [h, ← degree_eq_iff_natDegree_eq_of_pos (Nat.succ_pos 0)]
Theorem: CategoryTheory.ShortComplex.RightHomologyData.ofIsColimitCokernelCofork_p
File: Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean

Proof steps:
state_before: C : Type u_1
inst✝¹ : Category.{?u.24747, u_1} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
h : S.RightHomologyData
A : C
hg : S.g = 0
c : CokernelCofork S.f
hc : IsColimit c
⊢ Cofork.π c ≫ (Iso.refl c.pt).hom = Cofork.π (CokernelCofork.ofπ (Cofork.π c) ⋯)
state_after: no goals
tactic: aesop_cat
state_before: C : Type u_1
inst✝¹ : Category.{?u.24747, u_1} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
h : S.RightHomologyData
A : C
hg : S.g = 0
c : CokernelCofork S.f
hc : IsColimit c
⊢ Cofork.π c ≫ 𝟙 c.pt ≫ (hc.ofIsoColimit (Cofork.ext (Iso.refl c.pt) ⋯)).desc (CokernelCofork.ofπ S.g ⋯) =
    Cofork.π c ≫ 0
state_after: no goals
tactic: simp [hg]
state_before: C : Type u_1
inst✝¹ : Category.{?u.24747, u_1} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
h : S.RightHomologyData
A : C
hg : S.g = 0
c : CokernelCofork S.f
hc : IsColimit c
⊢ Cofork.π c ≫ (hc.ofIsoColimit (Cofork.ext (Iso.refl c.pt) ⋯)).desc (CokernelCofork.ofπ S.g ⋯) = Cofork.π c ≫ 0
state_after: no goals
tactic: simp [hg]
Theorem: Grp.SurjectiveOfEpiAuxs.one_smul
File: Mathlib/Algebra/Category/Grp/EpiMono.lean

Proof steps:
state_before: A B : Grp
f : A ⟶ B
x : X'
y : ↑(Set.range fun x => x • ↑(MonoidHom.range f))
⊢ 1 • fromCoset y = fromCoset y
state_after: A B : Grp
f : A ⟶ B
x : X'
y : ↑(Set.range fun x => x • ↑(MonoidHom.range f))
⊢ fromCoset ⟨1 • ↑y, ⋯⟩ = fromCoset y
tactic: change fromCoset _ = fromCoset _
state_before: A B : Grp
f : A ⟶ B
x : X'
y : ↑(Set.range fun x => x • ↑(MonoidHom.range f))
⊢ fromCoset ⟨1 • ↑y, ⋯⟩ = fromCoset y
state_after: no goals
tactic: simp only [one_leftCoset, Subtype.ext_iff_val]
Theorem: GenContFract.zeroth_conv'_eq_h
File: Mathlib/Algebra/ContinuedFractions/Translations.lean

Proof steps:
state_before: K : Type u_1
g : GenContFract K
n : ℕ
inst✝ : DivisionRing K
⊢ g.convs' 0 = g.h
state_after: no goals
tactic: simp [convs']
Theorem: Topology.isUpperSet_orderDual
File: Mathlib/Topology/Order/UpperLowerSetTopology.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : Preorder α
inst✝ : TopologicalSpace α
⊢ Topology.IsUpperSet αᵒᵈ ↔ Topology.IsLowerSet α
state_after: case mp
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : Preorder α
inst✝ : TopologicalSpace α
⊢ Topology.IsUpperSet αᵒᵈ → Topology.IsLowerSet α

case mpr
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : Preorder α
inst✝ : TopologicalSpace α
⊢ Topology.IsLowerSet α → Topology.IsUpperSet αᵒᵈ
tactic: constructor
Theorem: Equiv.Perm.Disjoint.commute
File: Mathlib/GroupTheory/Perm/Support.lean

Proof steps:
state_before: α : Type u_1
f g h✝ : Perm α
h : f.Disjoint g
x : α
hf : f x = x
hg : f (g x) = g x
⊢ (f * g) x = (g * f) x
state_after: no goals
tactic: simp [mul_apply, hf, hg]
state_before: α : Type u_1
f g h✝ : Perm α
h : f.Disjoint g
x : α
hf : f x = x
hg : g (g x) = g x
⊢ (f * g) x = (g * f) x
state_after: no goals
tactic: simp [mul_apply, hf, g.injective hg]
state_before: α : Type u_1
f g h✝ : Perm α
h : f.Disjoint g
x : α
hg : g x = x
hf : f (f x) = f x
⊢ (f * g) x = (g * f) x
state_after: no goals
tactic: simp [mul_apply, f.injective hf, hg]
state_before: α : Type u_1
f g h✝ : Perm α
h : f.Disjoint g
x : α
hg : g x = x
hf : g (f x) = f x
⊢ (f * g) x = (g * f) x
state_after: no goals
tactic: simp [mul_apply, hf, hg]
Theorem: CategoryTheory.ShortComplex.comp_liftCycles
File: Mathlib/Algebra/Homology/ShortComplex/LeftHomology.lean

Proof steps:
state_before: C : Type u_1
inst✝² : Category.{?u.199007, u_1} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
h : S.LeftHomologyData
A : C
k : A ⟶ S.X₂
hk : k ≫ S.g = 0
inst✝ : S.HasLeftHomology
A' : C
α : A' ⟶ A
⊢ (α ≫ k) ≫ S.g = 0
state_after: no goals
tactic: rw [assoc, hk, comp_zero]
state_before: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
h : S.LeftHomologyData
A : C
k : A ⟶ S.X₂
hk : k ≫ S.g = 0
inst✝ : S.HasLeftHomology
A' : C
α : A' ⟶ A
⊢ α ≫ S.liftCycles k hk = S.liftCycles (α ≫ k) ⋯
state_after: no goals
tactic: aesop_cat
Theorem: Nat.Partrec'.rfindOpt
File: Mathlib/Computability/Halting.lean

Proof steps:
state_before: n : ℕ
f : Vector ℕ (n + 1) → ℕ
hf : Partrec' ↑f
v : Vector ℕ n
b : ℕ
⊢ (b ∈ (Nat.rfind fun n_1 => Part.some (decide (1 - f (n_1 ::ᵥ v) = 0))).bind fun a => ↑pred (f (a ::ᵥ v))) ↔
    b ∈ Nat.rfindOpt fun a => ofNat (Option ℕ) (f (a ::ᵥ v))
state_after: n : ℕ
f : Vector ℕ (n + 1) → ℕ
hf : Partrec' ↑f
v : Vector ℕ n
b : ℕ
⊢ (∃ a ∈ Nat.rfind fun n_1 => Part.some (decide (1 ≤ f (n_1 ::ᵥ v))), b = (f (a ::ᵥ v)).pred) ↔
    ∃ a ∈ Nat.rfind fun n_1 => ↑(some (ofNat (Option ℕ) (f (n_1 ::ᵥ v))).isSome),
      ofNat (Option ℕ) (f (a ::ᵥ v)) = some b
tactic: simp only [Nat.rfindOpt, exists_prop, tsub_eq_zero_iff_le, PFun.coe_val, Part.mem_bind_iff,
        Part.mem_some_iff, Option.mem_def, Part.mem_coe]
state_before: n : ℕ
f : Vector ℕ (n + 1) → ℕ
hf : Partrec' ↑f
v : Vector ℕ n
b : ℕ
⊢ (∃ a ∈ Nat.rfind fun n_1 => Part.some (decide (1 ≤ f (n_1 ::ᵥ v))), b = (f (a ::ᵥ v)).pred) ↔
    ∃ a ∈ Nat.rfind fun n_1 => ↑(some (ofNat (Option ℕ) (f (n_1 ::ᵥ v))).isSome),
      ofNat (Option ℕ) (f (a ::ᵥ v)) = some b
state_after: case refine_1
n : ℕ
f : Vector ℕ (n + 1) → ℕ
hf : Partrec' ↑f
v : Vector ℕ n
b a : ℕ
⊢ (a ∈ Nat.rfind fun n_1 => Part.some (decide (1 ≤ f (n_1 ::ᵥ v)))) =
    (a ∈ Nat.rfind fun n_1 => ↑(some (ofNat (Option ℕ) (f (n_1 ::ᵥ v))).isSome))

case refine_2
n : ℕ
f : Vector ℕ (n + 1) → ℕ
hf : Partrec' ↑f
v : Vector ℕ n
b a : ℕ
h : a ∈ Nat.rfind fun n_1 => ↑(some (ofNat (Option ℕ) (f (n_1 ::ᵥ v))).isSome)
⊢ b = (f (a ::ᵥ v)).pred ↔ ofNat (Option ℕ) (f (a ::ᵥ v)) = some b
tactic: refine
        exists_congr fun a => (and_congr (iff_of_eq ?_) Iff.rfl).trans (and_congr_right fun h => ?_)
Theorem: CategoryTheory.PreGaloisCategory.fiberPullbackEquiv_symm_snd_apply
File: Mathlib/CategoryTheory/Galois/Basic.lean

Proof steps:
state_before: C : Type u₁
inst✝² : Category.{u₂, u₁} C
inst✝¹ : PreGaloisCategory C
F : C ⥤ FintypeCat
inst✝ : FiberFunctor F
X A B : C
f : A ⟶ X
g : B ⟶ X
a : ↑(F.obj A)
b : ↑(F.obj B)
h : F.map f a = F.map g b
⊢ F.map (pullback.snd f g) ((fiberPullbackEquiv F f g).symm ⟨(a, b), h⟩) = b
state_after: C : Type u₁
inst✝² : Category.{u₂, u₁} C
inst✝¹ : PreGaloisCategory C
F : C ⥤ FintypeCat
inst✝ : FiberFunctor F
X A B : C
f : A ⟶ X
g : B ⟶ X
a : ↑(F.obj A)
b : ↑(F.obj B)
h : F.map f a = F.map g b
⊢ F.map (pullback.snd f g)
      ((PreservesPullback.iso (F ⋙ FintypeCat.incl) f g).inv
        ((Types.pullbackIsoPullback (F.map f) (F.map g)).inv ⟨(a, b), h⟩)) =
    b
tactic: simp [fiberPullbackEquiv]
state_before: C : Type u₁
inst✝² : Category.{u₂, u₁} C
inst✝¹ : PreGaloisCategory C
F : C ⥤ FintypeCat
inst✝ : FiberFunctor F
X A B : C
f : A ⟶ X
g : B ⟶ X
a : ↑(F.obj A)
b : ↑(F.obj B)
h : F.map f a = F.map g b
⊢ F.map (pullback.snd f g)
      ((PreservesPullback.iso (F ⋙ FintypeCat.incl) f g).inv
        ((Types.pullbackIsoPullback (F.map f) (F.map g)).inv ⟨(a, b), h⟩)) =
    b
state_after: C : Type u₁
inst✝² : Category.{u₂, u₁} C
inst✝¹ : PreGaloisCategory C
F : C ⥤ FintypeCat
inst✝ : FiberFunctor F
X A B : C
f : A ⟶ X
g : B ⟶ X
a : ↑(F.obj A)
b : ↑(F.obj B)
h : F.map f a = F.map g b
⊢ ((Types.pullbackIsoPullback (F.map f) (F.map g)).inv ≫
        (PreservesPullback.iso (F ⋙ FintypeCat.incl) f g).inv ≫ (F ⋙ FintypeCat.incl).map (pullback.snd f g))
      ⟨(a, b), h⟩ =
    b
tactic: change ((Types.pullbackIsoPullback _ _).inv ≫ _ ≫
    (F ⋙ FintypeCat.incl).map (pullback.snd f g)) _ = _
state_before: C : Type u₁
inst✝² : Category.{u₂, u₁} C
inst✝¹ : PreGaloisCategory C
F : C ⥤ FintypeCat
inst✝ : FiberFunctor F
X A B : C
f : A ⟶ X
g : B ⟶ X
a : ↑(F.obj A)
b : ↑(F.obj B)
h : F.map f a = F.map g b
⊢ ((Types.pullbackIsoPullback (F.map f) (F.map g)).inv ≫
        (PreservesPullback.iso (F ⋙ FintypeCat.incl) f g).inv ≫ (F ⋙ FintypeCat.incl).map (pullback.snd f g))
      ⟨(a, b), h⟩ =
    b
state_after: no goals
tactic: erw [PreservesPullback.iso_inv_snd, Types.pullbackIsoPullback_inv_snd]
Theorem: CategoryTheory.MonoidalCategory.whisker_exchange
File: Mathlib/CategoryTheory/Monoidal/Category.lean

Proof steps:
state_before: C : Type u
𝒞 : Category.{v, u} C
inst✝ : MonoidalCategory C
W X Y Z : C
f : W ⟶ X
g : Y ⟶ Z
⊢ W ◁ g ≫ f ▷ Z = f ▷ Y ≫ X ◁ g
state_after: no goals
tactic: simp only [← id_tensorHom, ← tensorHom_id, ← tensor_comp, id_comp, comp_id]