ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: LinearMap.injOn_iff_surjOn
File: Mathlib/LinearAlgebra/FiniteDimensional/Defs.lean

Proof steps:
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₂
p : Submodule K V
inst✝ : FiniteDimensional K ↥p
f : V →ₗ[K] V
h : ∀ x ∈ p, f x ∈ p
⊢ Set.InjOn ⇑f ↑p ↔ Set.SurjOn ⇑f ↑p ↑p
state_after: 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₂
p : Submodule K V
inst✝ : FiniteDimensional K ↥p
f : V →ₗ[K] V
h : ∀ x ∈ p, f x ∈ p
⊢ Injective ((↑p).restrict ⇑f) ↔ Surjective (Set.MapsTo.restrict (⇑f) (↑p) (↑p) h)
tactic: rw [Set.injOn_iff_injective, ← Set.MapsTo.restrict_surjective_iff h]
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₂
p : Submodule K V
inst✝ : FiniteDimensional K ↥p
f : V →ₗ[K] V
h : ∀ x ∈ p, f x ∈ p
⊢ Injective ((↑p).restrict ⇑f) ↔ Surjective (Set.MapsTo.restrict (⇑f) (↑p) (↑p) h)
state_after: 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₂
p : Submodule K V
inst✝ : FiniteDimensional K ↥p
f : V →ₗ[K] V
h : ∀ x ∈ p, f x ∈ p
⊢ Injective ⇑(f.domRestrict p) ↔ Surjective ⇑(f.restrict h)
tactic: change Injective (f.domRestrict p) ↔ Surjective (f.restrict h)
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₂
p : Submodule K V
inst✝ : FiniteDimensional K ↥p
f : V →ₗ[K] V
h : ∀ x ∈ p, f x ∈ p
⊢ Injective ⇑(f.domRestrict p) ↔ Surjective ⇑(f.restrict h)
state_after: no goals
tactic: simp [disjoint_iff, ← injective_iff_surjective]
Theorem: MeasureTheory.laverage_zero_measure
File: Mathlib/MeasureTheory/Integral/Average.lean

Proof steps:
state_before: α : Type u_1
E : Type u_2
F : Type u_3
m0 : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
μ ν : Measure α
s t : Set α
f✝ g f : α → ℝ≥0∞
⊢ ⨍⁻ (x : α), f x ∂0 = 0
state_after: no goals
tactic: simp [laverage]
Theorem: DirichletCharacter.primitiveCharacter_isPrimitive
File: Mathlib/NumberTheory/DirichletCharacter/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
⊢ χ.primitiveCharacter.IsPrimitive
state_after: case pos
R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
h : χ.conductor = 0
⊢ χ.primitiveCharacter.IsPrimitive

case neg
R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
h : ¬χ.conductor = 0
⊢ χ.primitiveCharacter.IsPrimitive
tactic: by_cases h : χ.conductor = 0
Theorem: IsRelPrime.prod_left
File: Mathlib/RingTheory/Coprime/Lemmas.lean

Proof steps:
state_before: α : Type u_2
I : Type u_1
inst✝¹ : CommMonoid α
inst✝ : DecompositionMonoid α
x y z : α
s : I → α
t : Finset I
⊢ (∀ i ∈ t, IsRelPrime (s i) x) → IsRelPrime (∏ i ∈ t, s i) x
state_after: no goals
tactic: classical
  refine Finset.induction_on t (fun _ ↦ isRelPrime_one_left) fun b t hbt ih H ↦ ?_
  rw [Finset.prod_insert hbt]
  rw [Finset.forall_mem_insert] at H
  exact H.1.mul_left (ih H.2)
Theorem: CategoryTheory.shiftFunctorAdd'_add_zero_hom_app
File: Mathlib/CategoryTheory/Shift/Basic.lean

Proof steps:
state_before: C : Type u
A : Type u_1
inst✝² : Category.{v, u} C
inst✝¹ : AddMonoid A
inst✝ : HasShift C A
a : A
X : C
⊢ (shiftFunctorAdd' C a 0 a ⋯).hom.app X = (shiftFunctorZero C A).inv.app ((shiftFunctor C a).obj X)
state_after: no goals
tactic: simpa using NatTrans.congr_app (congr_arg Iso.hom (shiftFunctorAdd'_add_zero C a)) X
Theorem: Polynomial.X_sub_C_mul_removeFactor
File: Mathlib/FieldTheory/SplittingField/Construction.lean

Proof steps:
state_before: F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
f : K[X]
hf : f.natDegree ≠ 0
⊢ (X - C (AdjoinRoot.root f.factor)) * f.removeFactor = map (AdjoinRoot.of f.factor) f
state_after: F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
f : K[X]
hf : f.natDegree ≠ 0
g : K[X]
hg : f = f.factor * g
⊢ (X - C (AdjoinRoot.root f.factor)) * f.removeFactor = map (AdjoinRoot.of f.factor) f
tactic: let ⟨g, hg⟩ := factor_dvd_of_natDegree_ne_zero hf
state_before: F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
f : K[X]
hf : f.natDegree ≠ 0
g : K[X]
hg : f = f.factor * g
⊢ (X - C (AdjoinRoot.root f.factor)) * f.removeFactor = map (AdjoinRoot.of f.factor) f
state_after: F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
f : K[X]
hf : f.natDegree ≠ 0
g : K[X]
hg : f = f.factor * g
⊢ (map (AdjoinRoot.of f.factor) f).IsRoot (AdjoinRoot.root f.factor)
tactic: apply (mul_divByMonic_eq_iff_isRoot
    (R := AdjoinRoot f.factor) (a := AdjoinRoot.root f.factor)).mpr
state_before: F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
f : K[X]
hf : f.natDegree ≠ 0
g : K[X]
hg : f = f.factor * g
⊢ (map (AdjoinRoot.of f.factor) f).IsRoot (AdjoinRoot.root f.factor)
state_after: no goals
tactic: rw [IsRoot.def, eval_map, hg, eval₂_mul, ← hg, AdjoinRoot.eval₂_root, zero_mul]
Theorem: CategoryTheory.MonoidalCategory.pentagon_inv_inv_hom
File: Mathlib/CategoryTheory/Monoidal/CoherenceLemmas.lean

Proof steps:
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : MonoidalCategory C
W X Y Z : C
⊢ (α_ W (X ⊗ Y) Z).inv ≫ ((α_ W X Y).inv ⊗ 𝟙 Z) ≫ (α_ (W ⊗ X) Y Z).hom = (𝟙 W ⊗ (α_ X Y Z).hom) ≫ (α_ W X (Y ⊗ Z)).inv
state_after: no goals
tactic: coherence
Theorem: AddAction.mem_stabilizer_set_iff_subset_vadd_set
File: Mathlib/Algebra/Pointwise/Stabilizer.lean

Proof steps:
state_before: G : Type u_1
H : Type u_2
α : Type u_3
inst✝² : Group G
inst✝¹ : Group H
inst✝ : MulAction G α
a : G
s : Set α
hs : s.Finite
⊢ a ∈ stabilizer G s ↔ s ⊆ a • s
state_after: case intro
G : Type u_1
H : Type u_2
α : Type u_3
inst✝² : Group G
inst✝¹ : Group H
inst✝ : MulAction G α
a : G
s : Finset α
⊢ a ∈ stabilizer G ↑s ↔ ↑s ⊆ a • ↑s
tactic: lift s to Finset α using hs
state_before: case intro
G : Type u_1
H : Type u_2
α : Type u_3
inst✝² : Group G
inst✝¹ : Group H
inst✝ : MulAction G α
a : G
s : Finset α
⊢ a ∈ stabilizer G ↑s ↔ ↑s ⊆ a • ↑s
state_after: no goals
tactic: classical
  rw [stabilizer_coe_finset, mem_stabilizer_finset_iff_subset_smul_finset, ← Finset.coe_smul_finset,
    Finset.coe_subset]
Theorem: Matrix.nnnorm_diagonal
File: Mathlib/Analysis/Matrix.lean

Proof steps:
state_before: R : Type u_1
l : Type u_2
m : Type u_3
n : Type u_4
α : Type u_5
β : Type u_6
ι : Type u_7
inst✝⁶ : Fintype l
inst✝⁵ : Fintype m
inst✝⁴ : Fintype n
inst✝³ : Unique ι
inst✝² : SeminormedAddCommGroup α
inst✝¹ : SeminormedAddCommGroup β
inst✝ : DecidableEq n
v : n → α
⊢ ‖diagonal v‖₊ = ‖v‖₊
state_after: R : Type u_1
l : Type u_2
m : Type u_3
n : Type u_4
α : Type u_5
β : Type u_6
ι : Type u_7
inst✝⁶ : Fintype l
inst✝⁵ : Fintype m
inst✝⁴ : Fintype n
inst✝³ : Unique ι
inst✝² : SeminormedAddCommGroup α
inst✝¹ : SeminormedAddCommGroup β
inst✝ : DecidableEq n
v : n → α
⊢ (Finset.univ.sup fun b => Finset.univ.sup fun b_1 => ‖diagonal v b b_1‖₊) = Finset.univ.sup fun b => ‖v b‖₊
tactic: simp_rw [nnnorm_def, Pi.nnnorm_def]
state_before: R : Type u_1
l : Type u_2
m : Type u_3
n : Type u_4
α : Type u_5
β : Type u_6
ι : Type u_7
inst✝⁶ : Fintype l
inst✝⁵ : Fintype m
inst✝⁴ : Fintype n
inst✝³ : Unique ι
inst✝² : SeminormedAddCommGroup α
inst✝¹ : SeminormedAddCommGroup β
inst✝ : DecidableEq n
v : n → α
⊢ (Finset.univ.sup fun b => Finset.univ.sup fun b_1 => ‖diagonal v b b_1‖₊) = Finset.univ.sup fun b => ‖v b‖₊
state_after: case e_f.h
R : Type u_1
l : Type u_2
m : Type u_3
n : Type u_4
α : Type u_5
β : Type u_6
ι : Type u_7
inst✝⁶ : Fintype l
inst✝⁵ : Fintype m
inst✝⁴ : Fintype n
inst✝³ : Unique ι
inst✝² : SeminormedAddCommGroup α
inst✝¹ : SeminormedAddCommGroup β
inst✝ : DecidableEq n
v : n → α
i : n
⊢ (Finset.univ.sup fun b => ‖diagonal v i b‖₊) = ‖v i‖₊
tactic: congr 1 with i : 1
state_before: case e_f.h
R : Type u_1
l : Type u_2
m : Type u_3
n : Type u_4
α : Type u_5
β : Type u_6
ι : Type u_7
inst✝⁶ : Fintype l
inst✝⁵ : Fintype m
inst✝⁴ : Fintype n
inst✝³ : Unique ι
inst✝² : SeminormedAddCommGroup α
inst✝¹ : SeminormedAddCommGroup β
inst✝ : DecidableEq n
v : n → α
i : n
⊢ (Finset.univ.sup fun b => ‖diagonal v i b‖₊) = ‖v i‖₊
state_after: case e_f.h.refine_1
R : Type u_1
l : Type u_2
m : Type u_3
n : Type u_4
α : Type u_5
β : Type u_6
ι : Type u_7
inst✝⁶ : Fintype l
inst✝⁵ : Fintype m
inst✝⁴ : Fintype n
inst✝³ : Unique ι
inst✝² : SeminormedAddCommGroup α
inst✝¹ : SeminormedAddCommGroup β
inst✝ : DecidableEq n
v : n → α
i j : n
hj : j ∈ Finset.univ
⊢ ‖diagonal v i j‖₊ ≤ ‖v i‖₊

case e_f.h.refine_2
R : Type u_1
l : Type u_2
m : Type u_3
n : Type u_4
α : Type u_5
β : Type u_6
ι : Type u_7
inst✝⁶ : Fintype l
inst✝⁵ : Fintype m
inst✝⁴ : Fintype n
inst✝³ : Unique ι
inst✝² : SeminormedAddCommGroup α
inst✝¹ : SeminormedAddCommGroup β
inst✝ : DecidableEq n
v : n → α
i : n
⊢ ‖v i‖₊ ≤ Finset.univ.sup fun b => ‖diagonal v i b‖₊
tactic: refine le_antisymm (Finset.sup_le fun j hj => ?_) ?_
Theorem: Polynomial.degree_quadratic
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

Proof steps:
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
ha : a ≠ 0
⊢ (C a * X ^ 2 + C b * X + C c).degree = 2
state_after: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
ha : a ≠ 0
⊢ ↑2 = 2
tactic: rw [add_assoc, degree_add_eq_left_of_degree_lt <| degree_linear_lt_degree_C_mul_X_sq ha,
    degree_C_mul_X_pow 2 ha]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
ha : a ≠ 0
⊢ ↑2 = 2
state_after: no goals
tactic: rfl
Theorem: Function.apply_update
File: Mathlib/Logic/Function/Basic.lean

Proof steps:
state_before: α✝ : Sort u
β✝ : α✝ → Sort v
α' : Sort w
inst✝² : DecidableEq α✝
inst✝¹ : DecidableEq α'
f✝ g✝ : (a : α✝) → β✝ a
a : α✝
b : β✝ a
ι : Sort u_1
inst✝ : DecidableEq ι
α : ι → Sort u_2
β : ι → Sort u_3
f : (i : ι) → α i → β i
g : (i : ι) → α i
i : ι
v : α i
j : ι
⊢ f j (update g i v j) = update (fun k => f k (g k)) i (f i v) j
state_after: case pos
α✝ : Sort u
β✝ : α✝ → Sort v
α' : Sort w
inst✝² : DecidableEq α✝
inst✝¹ : DecidableEq α'
f✝ g✝ : (a : α✝) → β✝ a
a : α✝
b : β✝ a
ι : Sort u_1
inst✝ : DecidableEq ι
α : ι → Sort u_2
β : ι → Sort u_3
f : (i : ι) → α i → β i
g : (i : ι) → α i
i : ι
v : α i
j : ι
h : j = i
⊢ f j (update g i v j) = update (fun k => f k (g k)) i (f i v) j

case neg
α✝ : Sort u
β✝ : α✝ → Sort v
α' : Sort w
inst✝² : DecidableEq α✝
inst✝¹ : DecidableEq α'
f✝ g✝ : (a : α✝) → β✝ a
a : α✝
b : β✝ a
ι : Sort u_1
inst✝ : DecidableEq ι
α : ι → Sort u_2
β : ι → Sort u_3
f : (i : ι) → α i → β i
g : (i : ι) → α i
i : ι
v : α i
j : ι
h : ¬j = i
⊢ f j (update g i v j) = update (fun k => f k (g k)) i (f i v) j
tactic: by_cases h : j = i
Theorem: Turing.TM1to1.supportsStmt_move
File: Mathlib/Computability/TuringMachine.lean

Proof steps:
state_before: Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_2
inst✝¹ : Inhabited Λ
σ : Type u_3
inst✝ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
S : Finset Λ'
d : Dir
q : Stmt Bool Λ' σ
⊢ SupportsStmt S (move d q) = SupportsStmt S q
state_after: Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_2
inst✝¹ : Inhabited Λ
σ : Type u_3
inst✝ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
S : Finset Λ'
d : Dir
q : Stmt Bool Λ' σ
⊢ ∀ {i : ℕ}, SupportsStmt S ((Stmt.move d)^[i] q) = SupportsStmt S q
tactic: suffices ∀ {i}, SupportsStmt S ((Stmt.move d)^[i] q) = _ from this
state_before: Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_2
inst✝¹ : Inhabited Λ
σ : Type u_3
inst✝ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
S : Finset Λ'
d : Dir
q : Stmt Bool Λ' σ
⊢ ∀ {i : ℕ}, SupportsStmt S ((Stmt.move d)^[i] q) = SupportsStmt S q
state_after: Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_2
inst✝¹ : Inhabited Λ
σ : Type u_3
inst✝ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
S : Finset Λ'
d : Dir
q : Stmt Bool Λ' σ
i : ℕ
⊢ SupportsStmt S ((Stmt.move d)^[i] q) = SupportsStmt S q
tactic: intro i
state_before: Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_2
inst✝¹ : Inhabited Λ
σ : Type u_3
inst✝ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
S : Finset Λ'
d : Dir
q : Stmt Bool Λ' σ
i : ℕ
⊢ SupportsStmt S ((Stmt.move d)^[i] q) = SupportsStmt S q
state_after: case succ
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_2
inst✝¹ : Inhabited Λ
σ : Type u_3
inst✝ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
S : Finset Λ'
d : Dir
n✝ : ℕ
a✝ : ∀ {q : Stmt Bool Λ' σ}, SupportsStmt S ((Stmt.move d)^[n✝] q) = SupportsStmt S q
q : Stmt Bool Λ' σ
⊢ SupportsStmt S (Stmt.move d q) = SupportsStmt S q
tactic: induction i generalizing q <;> simp only [*, iterate]
state_before: case succ
Γ : Type u_1
inst✝² : Inhabited Γ
Λ : Type u_2
inst✝¹ : Inhabited Λ
σ : Type u_3
inst✝ : Inhabited σ
n : ℕ
enc : Γ → Vector Bool n
dec : Vector Bool n → Γ
S : Finset Λ'
d : Dir
n✝ : ℕ
a✝ : ∀ {q : Stmt Bool Λ' σ}, SupportsStmt S ((Stmt.move d)^[n✝] q) = SupportsStmt S q
q : Stmt Bool Λ' σ
⊢ SupportsStmt S (Stmt.move d q) = SupportsStmt S q
state_after: no goals
tactic: rfl
Theorem: MeasurableSpace.measurableSet_succ_memPartition
File: Mathlib/MeasureTheory/MeasurableSpace/CountablyGenerated.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
hs : s ∈ memPartition t n
⊢ MeasurableSet s
state_after: α : Type u_1
β : Type u_2
t : ℕ → Set α
n : ℕ
s : Set α
hs : s ∈ memPartition t n
⊢ MeasurableSet (s \ t n ∪ s ∩ t n)
tactic: rw [← diff_union_inter s (t n)]
Theorem: Set.antitoneOn_iff_antitone
File: Mathlib/Data/Set/Basic.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
inst✝¹ : Preorder α
inst✝ : Preorder β
f : α → β
⊢ AntitoneOn f s ↔ Antitone fun a => f ↑a
state_after: no goals
tactic: simp [Antitone, AntitoneOn]
Theorem: List.rdropWhile_eq_self_iff
File: Mathlib/Data/List/DropRight.lean

Proof steps:
state_before: α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ rdropWhile p l = l ↔ ∀ (hl : l ≠ []), ¬p (l.getLast hl) = true
state_after: α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ (∀ (hl : 0 < l.reverse.length), ¬p (l.reverse.get ⟨0, hl⟩) = true) ↔
    ∀ (hl : l ≠ []), ¬p (l.get ⟨l.length - 1, ⋯⟩) = true
tactic: simp only [rdropWhile, reverse_eq_iff, dropWhile_eq_self_iff, getLast_eq_get]
state_before: α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ (∀ (hl : 0 < l.reverse.length), ¬p (l.reverse.get ⟨0, hl⟩) = true) ↔
    ∀ (hl : l ≠ []), ¬p (l.get ⟨l.length - 1, ⋯⟩) = true
state_after: case refine_1
α : Type u_1
p : α → Bool
l : List α
n : ℕ
h : ∀ (hl : 0 < l.reverse.length), ¬p (l.reverse.get ⟨0, hl⟩) = true
hl : l ≠ []
⊢ ¬p (l.get ⟨l.length - 1, ⋯⟩) = true

case refine_2
α : Type u_1
p : α → Bool
l : List α
n : ℕ
h : ∀ (hl : l ≠ []), ¬p (l.get ⟨l.length - 1, ⋯⟩) = true
hl : 0 < l.reverse.length
⊢ ¬p (l.reverse.get ⟨0, hl⟩) = true
tactic: refine ⟨fun h hl => ?_, fun h hl => ?_⟩
Theorem: Nat.ModEq.add
File: Mathlib/Data/Nat/ModEq.lean

Proof steps:
state_before: m n a b c d : ℕ
h₁ : a ≡ b [MOD n]
h₂ : c ≡ d [MOD n]
⊢ a + c ≡ b + d [MOD n]
state_after: m n a b c d : ℕ
h₁ : a ≡ b [MOD n]
h₂ : c ≡ d [MOD n]
⊢ ↑n ∣ ↑b - ↑a + (↑d - ↑c)
tactic: rw [modEq_iff_dvd, Int.ofNat_add, Int.ofNat_add, add_sub_add_comm]
state_before: m n a b c d : ℕ
h₁ : a ≡ b [MOD n]
h₂ : c ≡ d [MOD n]
⊢ ↑n ∣ ↑b - ↑a + (↑d - ↑c)
state_after: no goals
tactic: exact dvd_add h₁.dvd h₂.dvd
Theorem: Matroid.Indep.augment
File: Mathlib/Data/Matroid/Restrict.lean

Proof steps:
state_before: α : Type u_1
M : Matroid α
R I J✝ X Y B J : Set α
e : α
hI : M.Indep I
hJ : M.Indep J
hIJ : I.encard < J.encard
⊢ ∃ e ∈ J \ I, M.Indep (insert e I)
state_after: α : Type u_1
M : Matroid α
R I J✝ X Y B J : Set α
e : α
hI : M.Indep I
hJ : M.Indep J
hIJ : I.encard < J.encard
he : ∀ e ∈ J \ I, ¬M.Indep (insert e I)
⊢ False
tactic: by_contra! he
state_before: α : Type u_1
M : Matroid α
R I J✝ X Y B J : Set α
e : α
hI : M.Indep I
hJ : M.Indep J
hIJ : I.encard < J.encard
he : ∀ e ∈ J \ I, ¬M.Indep (insert e I)
⊢ False
state_after: α : Type u_1
M : Matroid α
R I J✝ X Y B J : Set α
e : α
hI : M.Indep I
hJ : M.Indep J
hIJ : I.encard < J.encard
he : ∀ e ∈ J \ I, ¬M.Indep (insert e I)
hb : M.Basis I (I ∪ J)
⊢ False
tactic: have hb : M.Basis I (I ∪ J) := by
    simp_rw [hI.basis_iff_forall_insert_dep subset_union_left, union_diff_left, mem_diff,
      and_imp, dep_iff, insert_subset_iff, and_iff_left hI.subset_ground]
    exact fun e heJ heI ↦ ⟨he e ⟨heJ, heI⟩, hJ.subset_ground heJ⟩
state_before: α : Type u_1
M : Matroid α
R I J✝ X Y B J : Set α
e : α
hI : M.Indep I
hJ : M.Indep J
hIJ : I.encard < J.encard
he : ∀ e ∈ J \ I, ¬M.Indep (insert e I)
hb : M.Basis I (I ∪ J)
⊢ False
state_after: case intro.intro
α : Type u_1
M : Matroid α
R I J✝ X Y B J : Set α
e : α
hI : M.Indep I
hJ : M.Indep J
hIJ : I.encard < J.encard
he : ∀ e ∈ J \ I, ¬M.Indep (insert e I)
hb : M.Basis I (I ∪ J)
J' : Set α
hJ' : M.Basis J' (I ∪ J)
hJJ' : J ⊆ J'
⊢ False
tactic: obtain ⟨J', hJ', hJJ'⟩ := hJ.subset_basis_of_subset I.subset_union_right
state_before: case intro.intro
α : Type u_1
M : Matroid α
R I J✝ X Y B J : Set α
e : α
hI : M.Indep I
hJ : M.Indep J
hIJ : I.encard < J.encard
he : ∀ e ∈ J \ I, ¬M.Indep (insert e I)
hb : M.Basis I (I ∪ J)
J' : Set α
hJ' : M.Basis J' (I ∪ J)
hJJ' : J ⊆ J'
⊢ False
state_after: case intro.intro
α : Type u_1
M : Matroid α
R I J✝ X Y B J : Set α
e : α
hI : M.Indep I
hJ : M.Indep J
he : ∀ e ∈ J \ I, ¬M.Indep (insert e I)
hb : M.Basis I (I ∪ J)
J' : Set α
hIJ : J'.encard < J.encard
hJ' : M.Basis J' (I ∪ J)
hJJ' : J ⊆ J'
⊢ False
tactic: rw [← hJ'.encard_eq_encard hb] at hIJ
state_before: case intro.intro
α : Type u_1
M : Matroid α
R I J✝ X Y B J : Set α
e : α
hI : M.Indep I
hJ : M.Indep J
he : ∀ e ∈ J \ I, ¬M.Indep (insert e I)
hb : M.Basis I (I ∪ J)
J' : Set α
hIJ : J'.encard < J.encard
hJ' : M.Basis J' (I ∪ J)
hJJ' : J ⊆ J'
⊢ False
state_after: no goals
tactic: exact hIJ.not_le (encard_mono hJJ')
Theorem: inseparable_iff_clusterPt_uniformity
File: Mathlib/Topology/UniformSpace/Separation.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
x y : α
⊢ Inseparable x y ↔ ClusterPt (x, y) (𝓤 α)
state_after: α : Type u
β : Type v
γ : Type w
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
x y : α
h : ClusterPt (x, y) (𝓤 α)
⊢ Inseparable x y
tactic: refine ⟨fun h ↦ .of_nhds_le h.nhds_le_uniformity, fun h ↦ ?_⟩
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
x y : α
h : ClusterPt (x, y) (𝓤 α)
⊢ Inseparable x y
state_after: α : Type u
β : Type v
γ : Type w
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
x y : α
h : ClusterPt (x, y) (𝓤 α)
⊢ ∀ (i : Set (α × α)), (i ∈ 𝓤 α ∧ ∀ (a : α × α), ClusterPt a (𝓟 i) → a ∈ i) → (x, y) ∈ id i
tactic: simp_rw [uniformity_hasBasis_closed.inseparable_iff_uniformity, isClosed_iff_clusterPt]
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
x y : α
h : ClusterPt (x, y) (𝓤 α)
⊢ ∀ (i : Set (α × α)), (i ∈ 𝓤 α ∧ ∀ (a : α × α), ClusterPt a (𝓟 i) → a ∈ i) → (x, y) ∈ id i
state_after: no goals
tactic: exact fun U ⟨hU, hUc⟩ ↦ hUc _ <| h.mono <| le_principal_iff.2 hU
Theorem: MulActionWithZero.subsingleton
File: Mathlib/Algebra/SMulWithZero.lean

Proof steps:
state_before: R : Type u_1
R' : Type u_2
M : Type u_3
M' : Type u_4
inst✝⁴ : MonoidWithZero R
inst✝³ : MonoidWithZero R'
inst✝² : Zero M
inst✝¹ : MulActionWithZero R M
inst✝ : Subsingleton R
x y : M
⊢ x = y
state_after: no goals
tactic: rw [← one_smul R x, ← one_smul R y, Subsingleton.elim (1 : R) 0, zero_smul, zero_smul]
Theorem: ClosedEmbedding.closed_iff_image_closed
File: Mathlib/Topology/Maps/Basic.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
ι : Type u_4
f : X → Y
g : Y → Z
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
hf : ClosedEmbedding f
s : Set X
h : IsClosed (f '' s)
⊢ IsClosed s
state_after: X : Type u_1
Y : Type u_2
Z : Type u_3
ι : Type u_4
f : X → Y
g : Y → Z
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
hf : ClosedEmbedding f
s : Set X
h : IsClosed (f '' s)
⊢ IsClosed (f ⁻¹' (f '' s))
tactic: rw [← preimage_image_eq s hf.inj]
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
ι : Type u_4
f : X → Y
g : Y → Z
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
hf : ClosedEmbedding f
s : Set X
h : IsClosed (f '' s)
⊢ IsClosed (f ⁻¹' (f '' s))
state_after: no goals
tactic: exact h.preimage hf.continuous
Theorem: Ideal.Quotient.isDomain_iff_prime
File: Mathlib/RingTheory/Ideal/Quotient.lean

Proof steps:
state_before: R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
x y : R
I : Ideal R
⊢ IsDomain (R ⧸ I) ↔ I.IsPrime
state_after: case refine_1
R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
x y : R
I : Ideal R
H : IsDomain (R ⧸ I)
⊢ 0 ≠ 1

case refine_2
R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
x✝ y✝ : R
I : Ideal R
H : IsDomain (R ⧸ I)
x y : R
h : x * y ∈ I
⊢ x ∈ I ∨ y ∈ I
tactic: refine ⟨fun H => ⟨zero_ne_one_iff.1 ?_, fun {x y} h => ?_⟩, fun h => inferInstance⟩
Theorem: Submodule.eq_bot_of_le_smul_of_le_jacobson_bot
File: Mathlib/RingTheory/Nakayama.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
I : Ideal R
N : Submodule R M
hN : N.FG
hIN : N ≤ I • N
hIjac : I ≤ ⊥.jacobson
⊢ N = ⊥
state_after: no goals
tactic: rw [eq_smul_of_le_smul_of_le_jacobson hN hIN hIjac, Submodule.bot_smul]
Theorem: Nat.Prime.divisors_sq
File: Mathlib/Data/Finset/NatDivisors.lean

Proof steps:
state_before: p : ℕ
hp : Prime p
⊢ (p ^ 2).divisors = {p ^ 2, p, 1}
state_after: no goals
tactic: simp [divisors_prime_pow hp, range_succ]
Theorem: Int.exists_mul_self
File: Mathlib/Data/Int/Sqrt.lean

Proof steps:
state_before: x : ℤ
x✝ : ∃ n, n * n = x
n : ℤ
hn : n * n = x
⊢ sqrt x * sqrt x = x
state_after: no goals
tactic: rw [← hn, sqrt_eq, ← Int.ofNat_mul, natAbs_mul_self]
Theorem: Pi.card_Iio
File: Mathlib/Data/Pi/Interval.lean

Proof steps:
state_before: ι : Type u_1
α : ι → Type u_2
inst✝⁴ : Fintype ι
inst✝³ : DecidableEq ι
inst✝² : (i : ι) → DecidableEq (α i)
inst✝¹ : (i : ι) → PartialOrder (α i)
inst✝ : (i : ι) → LocallyFiniteOrderBot (α i)
b : (i : ι) → α i
⊢ (Iio b).card = ∏ i : ι, (Iic (b i)).card - 1
state_after: no goals
tactic: rw [card_Iio_eq_card_Iic_sub_one, card_Iic]
Theorem: Subgroup.zpowers_eq_closure
File: Mathlib/Algebra/Group/Subgroup/ZPowers.lean

Proof steps:
state_before: G : Type u_1
inst✝² : Group G
A : Type u_2
inst✝¹ : AddGroup A
N : Type u_3
inst✝ : Group N
g : G
⊢ zpowers g = closure {g}
state_after: case h
G : Type u_1
inst✝² : Group G
A : Type u_2
inst✝¹ : AddGroup A
N : Type u_3
inst✝ : Group N
g x✝ : G
⊢ x✝ ∈ zpowers g ↔ x✝ ∈ closure {g}
tactic: ext
state_before: case h
G : Type u_1
inst✝² : Group G
A : Type u_2
inst✝¹ : AddGroup A
N : Type u_3
inst✝ : Group N
g x✝ : G
⊢ x✝ ∈ zpowers g ↔ x✝ ∈ closure {g}
state_after: no goals
tactic: exact mem_closure_singleton.symm