1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: FirstOrder.Language.LHom.realize_onTerm
File: Mathlib/ModelTheory/Semantics.lean

tactic: induction' t with _ n f ts ih
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝⁴ : L.Structure M
inst✝³ : L.Structure N
inst✝² : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
inst✝¹ : L'.Structure M
φ : L →ᴸ L'
inst✝ : φ.IsExpansionOn M
t : L.Term α
v : α → M
⊢ Term.realize v (φ.onTerm t) = Term.realize v t
state_after: case var
L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝⁴ : L.Structure M
inst✝³ : L.Structure N
inst✝² : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
inst✝¹ : L'.Structure M
φ : L →ᴸ L'
inst✝ : φ.IsExpansionOn M
v : α → M
a✝ : α
⊢ Term.realize v (φ.onTerm (var a✝)) = Term.realize v (var a✝)

case func
L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝⁴ : L.Structure M
inst✝³ : L.Structure N
inst✝² : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
inst✝¹ : L'.Structure M
φ : L →ᴸ L'
inst✝ : φ.IsExpansionOn M
v : α → M
n : ℕ
f : L.Functions n
ts : Fin n → L.Term α
ih : ∀ (a : Fin n), Term.realize v (φ.onTerm (ts a)) = Term.realize v (ts a)
⊢ Term.realize v (φ.onTerm (func f ts)) = Term.realize v (func f ts)

tactic: rfl
state_before: case var
L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝⁴ : L.Structure M
inst✝³ : L.Structure N
inst✝² : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
inst✝¹ : L'.Structure M
φ : L →ᴸ L'
inst✝ : φ.IsExpansionOn M
v : α → M
a✝ : α
⊢ Term.realize v (φ.onTerm (var a✝)) = Term.realize v (var a✝)
state_after: no goals

tactic: simp only [Term.realize, LHom.onTerm, LHom.map_onFunction, ih]
state_before: case func
L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝⁴ : L.Structure M
inst✝³ : L.Structure N
inst✝² : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
inst✝¹ : L'.Structure M
φ : L →ᴸ L'
inst✝ : φ.IsExpansionOn M
v : α → M
n : ℕ
f : L.Functions n
ts : Fin n → L.Term α
ih : ∀ (a : Fin n), Term.realize v (φ.onTerm (ts a)) = Term.realize v (ts a)
⊢ Term.realize v (φ.onTerm (func f ts)) = Term.realize v (func f ts)
state_after: no goals
Theorem: CategoryTheory.finitaryExtensive_of_preserves_and_reflects_isomorphism
File: Mathlib/CategoryTheory/Extensive.lean

tactic: haveI : ReflectsLimitsOfShape WalkingCospan F := reflectsLimitsOfShapeOfReflectsIsomorphisms
state_before: J : Type v'
inst✝⁸ : Category.{u', v'} J
C : Type u
inst✝⁷ : Category.{v, u} C
D : Type u''
inst✝⁶ : Category.{v'', u''} D
X Y : C
F : C ⥤ D
inst✝⁵ : FinitaryExtensive D
inst✝⁴ : HasFiniteCoproducts C
inst✝³ : HasPullbacks C
inst✝² : PreservesLimitsOfShape WalkingCospan F
inst✝¹ : PreservesColimitsOfShape (Discrete WalkingPair) F
inst✝ : F.ReflectsIsomorphisms
⊢ FinitaryExtensive C
state_after: J : Type v'
inst✝⁸ : Category.{u', v'} J
C : Type u
inst✝⁷ : Category.{v, u} C
D : Type u''
inst✝⁶ : Category.{v'', u''} D
X Y : C
F : C ⥤ D
inst✝⁵ : FinitaryExtensive D
inst✝⁴ : HasFiniteCoproducts C
inst✝³ : HasPullbacks C
inst✝² : PreservesLimitsOfShape WalkingCospan F
inst✝¹ : PreservesColimitsOfShape (Discrete WalkingPair) F
inst✝ : F.ReflectsIsomorphisms
this : ReflectsLimitsOfShape WalkingCospan F
⊢ FinitaryExtensive C

tactic: haveI : ReflectsColimitsOfShape (Discrete WalkingPair) F :=
  reflectsColimitsOfShapeOfReflectsIsomorphisms
state_before: J : Type v'
inst✝⁸ : Category.{u', v'} J
C : Type u
inst✝⁷ : Category.{v, u} C
D : Type u''
inst✝⁶ : Category.{v'', u''} D
X Y : C
F : C ⥤ D
inst✝⁵ : FinitaryExtensive D
inst✝⁴ : HasFiniteCoproducts C
inst✝³ : HasPullbacks C
inst✝² : PreservesLimitsOfShape WalkingCospan F
inst✝¹ : PreservesColimitsOfShape (Discrete WalkingPair) F
inst✝ : F.ReflectsIsomorphisms
this : ReflectsLimitsOfShape WalkingCospan F
⊢ FinitaryExtensive C
state_after: J : Type v'
inst✝⁸ : Category.{u', v'} J
C : Type u
inst✝⁷ : Category.{v, u} C
D : Type u''
inst✝⁶ : Category.{v'', u''} D
X Y : C
F : C ⥤ D
inst✝⁵ : FinitaryExtensive D
inst✝⁴ : HasFiniteCoproducts C
inst✝³ : HasPullbacks C
inst✝² : PreservesLimitsOfShape WalkingCospan F
inst✝¹ : PreservesColimitsOfShape (Discrete WalkingPair) F
inst✝ : F.ReflectsIsomorphisms
this✝ : ReflectsLimitsOfShape WalkingCospan F
this : ReflectsColimitsOfShape (Discrete WalkingPair) F
⊢ FinitaryExtensive C

tactic: exact finitaryExtensive_of_preserves_and_reflects F
state_before: J : Type v'
inst✝⁸ : Category.{u', v'} J
C : Type u
inst✝⁷ : Category.{v, u} C
D : Type u''
inst✝⁶ : Category.{v'', u''} D
X Y : C
F : C ⥤ D
inst✝⁵ : FinitaryExtensive D
inst✝⁴ : HasFiniteCoproducts C
inst✝³ : HasPullbacks C
inst✝² : PreservesLimitsOfShape WalkingCospan F
inst✝¹ : PreservesColimitsOfShape (Discrete WalkingPair) F
inst✝ : F.ReflectsIsomorphisms
this✝ : ReflectsLimitsOfShape WalkingCospan F
this : ReflectsColimitsOfShape (Discrete WalkingPair) F
⊢ FinitaryExtensive C
state_after: no goals
Theorem: homology'.π'_ι
File: Mathlib/CategoryTheory/Abelian/Homology.lean

tactic: dsimp [π', ι, homology'IsoKernelDesc]
state_before: A : Type u
inst✝¹ : Category.{v, u} A
inst✝ : Abelian A
X Y Z : A
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
⊢ π' f g w ≫ ι f g w = kernel.ι g ≫ cokernel.π f
state_after: A : Type u
inst✝¹ : Category.{v, u} A
inst✝ : Abelian A
X Y Z : A
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
⊢ (cokernel.π (kernel.lift g f w) ≫ (homology'IsoCokernelLift f g w).inv) ≫
      ((homology'IsoCokernelLift f g w).hom ≫ Abelian.homologyCToK f g w) ≫ kernel.ι (cokernel.desc f g w) =
    kernel.ι g ≫ cokernel.π f

tactic: simp
state_before: A : Type u
inst✝¹ : Category.{v, u} A
inst✝ : Abelian A
X Y Z : A
f : X ⟶ Y
g : Y ⟶ Z
w : f ≫ g = 0
⊢ (cokernel.π (kernel.lift g f w) ≫ (homology'IsoCokernelLift f g w).inv) ≫
      ((homology'IsoCokernelLift f g w).hom ≫ Abelian.homologyCToK f g w) ≫ kernel.ι (cokernel.desc f g w) =
    kernel.ι g ≫ cokernel.π f
state_after: no goals
Theorem: CategoryTheory.GlueData.t'_comp_eq_pullbackSymmetry
File: Mathlib/CategoryTheory/GlueData.lean

tactic: trans inv (D.t' i j k)
state_before: C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
i j k : D.J
⊢ D.t' j k i ≫ D.t' k i j =
    (pullbackSymmetry (D.f j k) (D.f j i)).hom ≫ D.t' j i k ≫ (pullbackSymmetry (D.f i k) (D.f i j)).hom
state_after: C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
i j k : D.J
⊢ D.t' j k i ≫ D.t' k i j = inv (D.t' i j k)

C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
i j k : D.J
⊢ inv (D.t' i j k) =
    (pullbackSymmetry (D.f j k) (D.f j i)).hom ≫ D.t' j i k ≫ (pullbackSymmetry (D.f i k) (D.f i j)).hom

tactic: exact IsIso.eq_inv_of_hom_inv_id (D.cocycle _ _ _)
state_before: C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
i j k : D.J
⊢ D.t' j k i ≫ D.t' k i j = inv (D.t' i j k)
state_after: no goals

tactic: rw [← cancel_mono (pullback.fst : pullback (D.f i j) (D.f i k) ⟶ _)]
state_before: C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
i j k : D.J
⊢ inv (D.t' i j k) =
    (pullbackSymmetry (D.f j k) (D.f j i)).hom ≫ D.t' j i k ≫ (pullbackSymmetry (D.f i k) (D.f i j)).hom
state_after: C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
i j k : D.J
⊢ inv (D.t' i j k) ≫ pullback.fst =
    ((pullbackSymmetry (D.f j k) (D.f j i)).hom ≫ D.t' j i k ≫ (pullbackSymmetry (D.f i k) (D.f i j)).hom) ≫
      pullback.fst

tactic: simp [t_fac, t_fac_assoc]
state_before: C : Type u₁
inst✝¹ : Category.{v, u₁} C
C' : Type u₂
inst✝ : Category.{v, u₂} C'
D : GlueData C
i j k : D.J
⊢ inv (D.t' i j k) ≫ pullback.fst =
    ((pullbackSymmetry (D.f j k) (D.f j i)).hom ≫ D.t' j i k ≫ (pullbackSymmetry (D.f i k) (D.f i j)).hom) ≫
      pullback.fst
state_after: no goals
Theorem: Finsupp.some_single_some
File: Mathlib/Data/Finsupp/Basic.lean

tactic: classical
  ext b
  simp [single_apply]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : Zero M
a : α
m : M
⊢ (single (Option.some a) m).some = single a m
state_after: no goals

tactic: ext b
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : Zero M
a : α
m : M
⊢ (single (Option.some a) m).some = single a m
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : Zero M
a : α
m : M
b : α
⊢ (single (Option.some a) m).some b = (single a m) b

tactic: simp [single_apply]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : Zero M
a : α
m : M
b : α
⊢ (single (Option.some a) m).some b = (single a m) b
state_after: no goals
Theorem: Polynomial.eval₂_list_prod_noncomm
File: Mathlib/Algebra/Polynomial/Eval.lean

tactic: induction' ps using List.reverseRecOn with ps p ihp
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
inst✝ : Semiring T
ps : List R[X]
hf : ∀ p ∈ ps, ∀ (k : ℕ), Commute (f (p.coeff k)) x
⊢ eval₂ f x ps.prod = (List.map (eval₂ f x) ps).prod
state_after: case nil
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
inst✝ : Semiring T
hf : ∀ p ∈ [], ∀ (k : ℕ), Commute (f (p.coeff k)) x
⊢ eval₂ f x [].prod = (List.map (eval₂ f x) []).prod

case append_singleton
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
inst✝ : Semiring T
ps : List R[X]
p : R[X]
ihp : (∀ p ∈ ps, ∀ (k : ℕ), Commute (f (p.coeff k)) x) → eval₂ f x ps.prod = (List.map (eval₂ f x) ps).prod
hf : ∀ p_1 ∈ ps ++ [p], ∀ (k : ℕ), Commute (f (p_1.coeff k)) x
⊢ eval₂ f x (ps ++ [p]).prod = (List.map (eval₂ f x) (ps ++ [p])).prod

tactic: simp
state_before: case nil
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
inst✝ : Semiring T
hf : ∀ p ∈ [], ∀ (k : ℕ), Commute (f (p.coeff k)) x
⊢ eval₂ f x [].prod = (List.map (eval₂ f x) []).prod
state_after: no goals

tactic: simp only [List.forall_mem_append, List.forall_mem_singleton] at hf
state_before: case append_singleton
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
inst✝ : Semiring T
ps : List R[X]
p : R[X]
ihp : (∀ p ∈ ps, ∀ (k : ℕ), Commute (f (p.coeff k)) x) → eval₂ f x ps.prod = (List.map (eval₂ f x) ps).prod
hf : ∀ p_1 ∈ ps ++ [p], ∀ (k : ℕ), Commute (f (p_1.coeff k)) x
⊢ eval₂ f x (ps ++ [p]).prod = (List.map (eval₂ f x) (ps ++ [p])).prod
state_after: case append_singleton
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
inst✝ : Semiring T
ps : List R[X]
p : R[X]
ihp : (∀ p ∈ ps, ∀ (k : ℕ), Commute (f (p.coeff k)) x) → eval₂ f x ps.prod = (List.map (eval₂ f x) ps).prod
hf : (∀ x_1 ∈ ps, ∀ (k : ℕ), Commute (f (x_1.coeff k)) x) ∧ ∀ (k : ℕ), Commute (f (p.coeff k)) x
⊢ eval₂ f x (ps ++ [p]).prod = (List.map (eval₂ f x) (ps ++ [p])).prod

tactic: simp [eval₂_mul_noncomm _ _ hf.2, ihp hf.1]
state_before: case append_singleton
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
inst✝ : Semiring T
ps : List R[X]
p : R[X]
ihp : (∀ p ∈ ps, ∀ (k : ℕ), Commute (f (p.coeff k)) x) → eval₂ f x ps.prod = (List.map (eval₂ f x) ps).prod
hf : (∀ x_1 ∈ ps, ∀ (k : ℕ), Commute (f (x_1.coeff k)) x) ∧ ∀ (k : ℕ), Commute (f (p.coeff k)) x
⊢ eval₂ f x (ps ++ [p]).prod = (List.map (eval₂ f x) (ps ++ [p])).prod
state_after: no goals
Theorem: Turing.Tape.map_write
File: Mathlib/Computability/TuringMachine.lean

tactic: rintro ⟨⟩
state_before: Γ : Type u_1
Γ' : Type u_2
inst✝¹ : Inhabited Γ
inst✝ : Inhabited Γ'
f : PointedMap Γ Γ'
b : Γ
⊢ ∀ (T : Tape Γ), map f (write b T) = write (f.f b) (map f T)
state_after: case mk
Γ : Type u_1
Γ' : Type u_2
inst✝¹ : Inhabited Γ
inst✝ : Inhabited Γ'
f : PointedMap Γ Γ'
b head✝ : Γ
left✝ right✝ : ListBlank Γ
⊢ map f (write b { head := head✝, left := left✝, right := right✝ }) =
    write (f.f b) (map f { head := head✝, left := left✝, right := right✝ })

tactic: rfl
state_before: case mk
Γ : Type u_1
Γ' : Type u_2
inst✝¹ : Inhabited Γ
inst✝ : Inhabited Γ'
f : PointedMap Γ Γ'
b head✝ : Γ
left✝ right✝ : ListBlank Γ
⊢ map f (write b { head := head✝, left := left✝, right := right✝ }) =
    write (f.f b) (map f { head := head✝, left := left✝, right := right✝ })
state_after: no goals
Theorem: Representation.asGroupHom_apply
File: Mathlib/RepresentationTheory/Basic.lean

tactic: simp only [asGroupHom, MonoidHom.coe_toHomUnits]
state_before: k : Type u_1
G : Type u_2
V : Type u_3
inst✝³ : CommSemiring k
inst✝² : Group G
inst✝¹ : AddCommMonoid V
inst✝ : Module k V
ρ : Representation k G V
g : G
⊢ ↑(ρ.asGroupHom g) = ρ g
state_after: no goals
Theorem: Set.Ioo_union_Ioi'
File: Mathlib/Order/Interval/Set/Basic.lean

tactic: ext1 x
state_before: α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c < b
⊢ Ioo a b ∪ Ioi c = Ioi (min a c)
state_after: case h
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c < b
x : α
⊢ x ∈ Ioo a b ∪ Ioi c ↔ x ∈ Ioi (min a c)

tactic: simp_rw [mem_union, mem_Ioo, mem_Ioi, min_lt_iff]
state_before: case h
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c < b
x : α
⊢ x ∈ Ioo a b ∪ Ioi c ↔ x ∈ Ioi (min a c)
state_after: case h
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c < b
x : α
⊢ a < x ∧ x < b ∨ c < x ↔ a < x ∨ c < x

tactic: by_cases hc : c < x
state_before: case h
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c < b
x : α
⊢ a < x ∧ x < b ∨ c < x ↔ a < x ∨ c < x
state_after: case pos
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c < b
x : α
hc : c < x
⊢ a < x ∧ x < b ∨ c < x ↔ a < x ∨ c < x

case neg
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c < b
x : α
hc : ¬c < x
⊢ a < x ∧ x < b ∨ c < x ↔ a < x ∨ c < x

tactic: simp only [hc, or_true]
state_before: case pos
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c < b
x : α
hc : c < x
⊢ a < x ∧ x < b ∨ c < x ↔ a < x ∨ c < x
state_after: no goals

tactic: have hxb : x < b := (le_of_not_gt hc).trans_lt h₁
state_before: case neg
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c < b
x : α
hc : ¬c < x
⊢ a < x ∧ x < b ∨ c < x ↔ a < x ∨ c < x
state_after: case neg
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c < b
x : α
hc : ¬c < x
hxb : x < b
⊢ a < x ∧ x < b ∨ c < x ↔ a < x ∨ c < x

tactic: simp only [hxb, and_true]
state_before: case neg
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c < b
x : α
hc : ¬c < x
hxb : x < b
⊢ a < x ∧ x < b ∨ c < x ↔ a < x ∨ c < x
state_after: no goals
Theorem: IsSubgroup.inv_mem_iff
File: Mathlib/Deprecated/Subgroup.lean

tactic: simpa using hs.inv_mem h
state_before: G : Type u_1
H : Type u_2
A : Type u_3
a a₁ a₂ b c : G
inst✝ : Group G
s : Set G
hs : IsSubgroup s
h : a⁻¹ ∈ s
⊢ a ∈ s
state_after: no goals
Theorem: PNat.mod_le
File: Mathlib/Data/PNat/Basic.lean

tactic: change (mod m k : ℕ) ≤ (m : ℕ) ∧ (mod m k : ℕ) ≤ (k : ℕ)
state_before: m k : ℕ+
⊢ m.mod k ≤ m ∧ m.mod k ≤ k
state_after: m k : ℕ+
⊢ ↑(m.mod k) ≤ ↑m ∧ ↑(m.mod k) ≤ ↑k

tactic: rw [mod_coe]
state_before: m k : ℕ+
⊢ ↑(m.mod k) ≤ ↑m ∧ ↑(m.mod k) ≤ ↑k
state_after: m k : ℕ+
⊢ (if ↑m % ↑k = 0 then ↑k else ↑m % ↑k) ≤ ↑m ∧ (if ↑m % ↑k = 0 then ↑k else ↑m % ↑k) ≤ ↑k

tactic: split_ifs with h
state_before: m k : ℕ+
⊢ (if ↑m % ↑k = 0 then ↑k else ↑m % ↑k) ≤ ↑m ∧ (if ↑m % ↑k = 0 then ↑k else ↑m % ↑k) ≤ ↑k
state_after: case pos
m k : ℕ+
h : ↑m % ↑k = 0
⊢ ↑k ≤ ↑m ∧ ↑k ≤ ↑k

case neg
m k : ℕ+
h : ¬↑m % ↑k = 0
⊢ ↑m % ↑k ≤ ↑m ∧ ↑m % ↑k ≤ ↑k

tactic: have hm : (m : ℕ) > 0 := m.pos
state_before: case pos
m k : ℕ+
h : ↑m % ↑k = 0
⊢ ↑k ≤ ↑m ∧ ↑k ≤ ↑k
state_after: case pos
m k : ℕ+
h : ↑m % ↑k = 0
hm : ↑m > 0
⊢ ↑k ≤ ↑m ∧ ↑k ≤ ↑k

tactic: rw [← Nat.mod_add_div (m : ℕ) (k : ℕ), h, zero_add] at hm ⊢
state_before: case pos
m k : ℕ+
h : ↑m % ↑k = 0
hm : ↑m > 0
⊢ ↑k ≤ ↑m ∧ ↑k ≤ ↑k
state_after: case pos
m k : ℕ+
h : ↑m % ↑k = 0
hm : ↑k * (↑m / ↑k) > 0
⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k

tactic: by_cases h₁ : (m : ℕ) / (k : ℕ) = 0
state_before: case pos
m k : ℕ+
h : ↑m % ↑k = 0
hm : ↑k * (↑m / ↑k) > 0
⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k
state_after: case pos
m k : ℕ+
h : ↑m % ↑k = 0
hm : ↑k * (↑m / ↑k) > 0
h₁ : ↑m / ↑k = 0
⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k

case neg
m k : ℕ+
h : ↑m % ↑k = 0
hm : ↑k * (↑m / ↑k) > 0
h₁ : ¬↑m / ↑k = 0
⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k

tactic: rw [h₁, mul_zero] at hm
state_before: case pos
m k : ℕ+
h : ↑m % ↑k = 0
hm : ↑k * (↑m / ↑k) > 0
h₁ : ↑m / ↑k = 0
⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k
state_after: case pos
m k : ℕ+
h : ↑m % ↑k = 0
hm : 0 > 0
h₁ : ↑m / ↑k = 0
⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k

tactic: exact (lt_irrefl _ hm).elim
state_before: case pos
m k : ℕ+
h : ↑m % ↑k = 0
hm : 0 > 0
h₁ : ↑m / ↑k = 0
⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k
state_after: no goals

tactic: let h₂ : (k : ℕ) * 1 ≤ k * (m / k) :=
  Nat.mul_le_mul_left (k : ℕ) (Nat.succ_le_of_lt (Nat.pos_of_ne_zero h₁))
state_before: case neg
m k : ℕ+
h : ↑m % ↑k = 0
hm : ↑k * (↑m / ↑k) > 0
h₁ : ¬↑m / ↑k = 0
⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k
state_after: case neg
m k : ℕ+
h : ↑m % ↑k = 0
hm : ↑k * (↑m / ↑k) > 0
h₁ : ¬↑m / ↑k = 0
h₂ : ↑k * 1 ≤ ↑k * (↑m / ↑k) := Nat.mul_le_mul_left (↑k) (succ_le_of_lt (Nat.pos_of_ne_zero h₁))
⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k

tactic: rw [mul_one] at h₂
state_before: case neg
m k : ℕ+
h : ↑m % ↑k = 0
hm : ↑k * (↑m / ↑k) > 0
h₁ : ¬↑m / ↑k = 0
h₂ : ↑k * 1 ≤ ↑k * (↑m / ↑k) := Nat.mul_le_mul_left (↑k) (succ_le_of_lt (Nat.pos_of_ne_zero h₁))
⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k
state_after: case neg
m k : ℕ+
h : ↑m % ↑k = 0
hm : ↑k * (↑m / ↑k) > 0
h₁ : ¬↑m / ↑k = 0
h₂ : ↑k ≤ ↑k * (↑m / ↑k)
⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k

tactic: exact ⟨h₂, le_refl (k : ℕ)⟩
state_before: case neg
m k : ℕ+
h : ↑m % ↑k = 0
hm : ↑k * (↑m / ↑k) > 0
h₁ : ¬↑m / ↑k = 0
h₂ : ↑k ≤ ↑k * (↑m / ↑k)
⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k
state_after: no goals

tactic: exact ⟨Nat.mod_le (m : ℕ) (k : ℕ), (Nat.mod_lt (m : ℕ) k.pos).le⟩
state_before: case neg
m k : ℕ+
h : ¬↑m % ↑k = 0
⊢ ↑m % ↑k ≤ ↑m ∧ ↑m % ↑k ≤ ↑k
state_after: no goals
Theorem: PartialHomeomorph.IsImage.map_nhdsWithin_eq
File: Mathlib/Topology/PartialHomeomorph.lean

tactic: rw [e.map_nhdsWithin_eq hx, h.image_eq, e.nhdsWithin_target_inter (e.map_source hx)]
state_before: X : Type u_1
X' : Type u_2
Y : Type u_3
Y' : Type u_4
Z : Type u_5
Z' : Type u_6
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace X'
inst✝³ : TopologicalSpace Y
inst✝² : TopologicalSpace Y'
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace Z'
e : PartialHomeomorph X Y
s : Set X
t : Set Y
x : X
y : Y
h : e.IsImage s t
hx : x ∈ e.source
⊢ map (↑e) (𝓝[s] x) = 𝓝[t] ↑e x
state_after: no goals
Theorem: ModularGroup.bottom_row_coprime
File: Mathlib/NumberTheory/Modular.lean

tactic: use -(↑g : Matrix (Fin 2) (Fin 2) R) 0 1, (↑g : Matrix (Fin 2) (Fin 2) R) 0 0
state_before: g✝ : SL(2, ℤ)
z : ℍ
R : Type u_1
inst✝ : CommRing R
g : SL(2, R)
⊢ IsCoprime (↑g 1 0) (↑g 1 1)
state_after: case h
g✝ : SL(2, ℤ)
z : ℍ
R : Type u_1
inst✝ : CommRing R
g : SL(2, R)
⊢ -↑g 0 1 * ↑g 1 0 + ↑g 0 0 * ↑g 1 1 = 1

tactic: rw [add_comm, neg_mul, ← sub_eq_add_neg, ← det_fin_two]
state_before: case h
g✝ : SL(2, ℤ)
z : ℍ
R : Type u_1
inst✝ : CommRing R
g : SL(2, R)
⊢ -↑g 0 1 * ↑g 1 0 + ↑g 0 0 * ↑g 1 1 = 1
state_after: case h
g✝ : SL(2, ℤ)
z : ℍ
R : Type u_1
inst✝ : CommRing R
g : SL(2, R)
⊢ (↑g).det = 1

tactic: exact g.det_coe
state_before: case h
g✝ : SL(2, ℤ)
z : ℍ
R : Type u_1
inst✝ : CommRing R
g : SL(2, R)
⊢ (↑g).det = 1
state_after: no goals
Theorem: variationOnFromTo.eq_of_ge
File: Mathlib/Analysis/BoundedVariation.lean

tactic: rw [variationOnFromTo.eq_neg_swap, neg_inj, variationOnFromTo.eq_of_le f s h]
state_before: α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
f : α → E
s : Set α
a b : α
h : b ≤ a
⊢ variationOnFromTo f s a b = -(eVariationOn f (s ∩ Icc b a)).toReal
state_after: no goals
Theorem: sign_eq_neg_one_iff
File: Mathlib/Data/Sign.lean

tactic: refine ⟨fun h => ?_, fun h => sign_neg h⟩
state_before: α : Type u_1
inst✝² : Zero α
inst✝¹ : Preorder α
inst✝ : DecidableRel fun x x_1 => x < x_1
a : α
⊢ sign a = -1 ↔ a < 0
state_after: α : Type u_1
inst✝² : Zero α
inst✝¹ : Preorder α
inst✝ : DecidableRel fun x x_1 => x < x_1
a : α
h : sign a = -1
⊢ a < 0

tactic: rw [sign_apply] at h
state_before: α : Type u_1
inst✝² : Zero α
inst✝¹ : Preorder α
inst✝ : DecidableRel fun x x_1 => x < x_1
a : α
h : sign a = -1
⊢ a < 0
state_after: α : Type u_1
inst✝² : Zero α
inst✝¹ : Preorder α
inst✝ : DecidableRel fun x x_1 => x < x_1
a : α
h : (if 0 < a then 1 else if a < 0 then -1 else 0) = -1
⊢ a < 0

tactic: split_ifs at h
state_before: α : Type u_1
inst✝² : Zero α
inst✝¹ : Preorder α
inst✝ : DecidableRel fun x x_1 => x < x_1
a : α
h : (if 0 < a then 1 else if a < 0 then -1 else 0) = -1
⊢ a < 0
state_after: case pos
α : Type u_1
inst✝² : Zero α
inst✝¹ : Preorder α
inst✝ : DecidableRel fun x x_1 => x < x_1
a : α
h✝¹ : ¬0 < a
h✝ : a < 0
h : -1 = -1
⊢ a < 0

tactic: assumption
state_before: case pos
α : Type u_1
inst✝² : Zero α
inst✝¹ : Preorder α
inst✝ : DecidableRel fun x x_1 => x < x_1
a : α
h✝¹ : ¬0 < a
h✝ : a < 0
h : -1 = -1
⊢ a < 0
state_after: no goals
Theorem: Set.ssubset_singleton_iff
File: Mathlib/Data/Set/Basic.lean

tactic: rw [ssubset_iff_subset_ne, subset_singleton_iff_eq, or_and_right, and_not_self_iff, or_false_iff,
  and_iff_left_iff_imp]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t t₁ t₂ u s : Set α
x : α
⊢ s ⊂ {x} ↔ s = ∅
state_after: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t t₁ t₂ u s : Set α
x : α
⊢ s = ∅ → s ≠ {x}

tactic: exact fun h => h ▸ (singleton_ne_empty _).symm
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t t₁ t₂ u s : Set α
x : α
⊢ s = ∅ → s ≠ {x}
state_after: no goals
Theorem: BoxIntegral.Integrable.of_smul
File: Mathlib/Analysis/BoxIntegral/Basic.lean

tactic: simpa [inv_smul_smul₀ hc] using hf.smul c⁻¹
state_before: ι : Type u
E : Type v
F : Type w
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
I J : Box ι
π : TaggedPrepartition I
inst✝ : Fintype ι
l : IntegrationParams
f g : (ι → ℝ) → E
vol : ι →ᵇᵃ[⊤] E →L[ℝ] F
y y' : F
c : ℝ
hf : Integrable I l (c • f) vol
hc : c ≠ 0
⊢ Integrable I l f vol
state_after: no goals
Theorem: Filter.EventuallyEq.sub_eq
File: Mathlib/Order/Filter/Basic.lean

tactic: simpa using ((EventuallyEq.refl l f).sub h).symm
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
inst✝ : AddGroup β
f g : α → β
l : Filter α
h : f =ᶠ[l] g
⊢ f - g =ᶠ[l] 0
state_after: no goals