tasksource/leandojo huggingface dataset:
Theorem: Matrix.kroneckerMap_one_one
File: Mathlib/Data/Matrix/Kronecker.lean

tactic: simp only [hf₃, diagonal_one]
state_before: R : Type ?u.17787
α : Type u_1
α' : Type ?u.17793
β : Type u_2
β' : Type ?u.17799
γ : Type u_3
γ' : Type ?u.17805
l : Type ?u.17808
m : Type u_4
n : Type u_5
p : Type ?u.17817
q : Type ?u.17820
r : Type ?u.17823
l' : Type ?u.17826
m' : Type ?u.17829
n' : Type ?u.17832
p' : Type ?u.17835
inst✝⁷ : Zero α
inst✝⁶ : Zero β
inst✝⁵ : Zero γ
inst✝⁴ : One α
inst✝³ : One β
inst✝² : One γ
inst✝¹ : DecidableEq m
inst✝ : DecidableEq n
f : α → β → γ
hf₁ : ∀ (b : β), f 0 b = 0
hf₂ : ∀ (a : α), f a 0 = 0
hf₃ : f 1 1 = 1
⊢ (diagonal fun mn => f 1 1) = 1
Theorem: intervalIntegral.integral_neg
File: Mathlib/MeasureTheory/Integral/IntervalIntegral.lean

tactic: simp only [intervalIntegral, integral_neg]
state_before: ι : Type ?u.12763718
𝕜 : Type ?u.12763721
E : Type u_1
F : Type ?u.12763727
A : Type ?u.12763730
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
a b : ℝ
f g : ℝ → E
μ : MeasureTheory.Measure ℝ
⊢ (∫ (x : ℝ) in a..b, -f x ∂μ) = -∫ (x : ℝ) in a..b, f x ∂μ

tactic: abel
state_before: ι : Type ?u.12763718
𝕜 : Type ?u.12763721
E : Type u_1
F : Type ?u.12763727
A : Type ?u.12763730
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
a b : ℝ
f g : ℝ → E
μ : MeasureTheory.Measure ℝ
⊢ ((-∫ (a : ℝ) in Ioc a b, f a ∂μ) - -∫ (a : ℝ) in Ioc b a, f a ∂μ) =
    -((∫ (a : ℝ) in Ioc a b, f a ∂μ) - ∫ (a : ℝ) in Ioc b a, f a ∂μ)
Theorem: Set.Ioc_inter_Iic
File: Mathlib/Data/Set/Intervals/Basic.lean

tactic: rw [← Ioi_inter_Iic, ← Ioi_inter_Iic, inter_assoc, Iic_inter_Iic]
state_before: α : Type u_1
β : Type ?u.180034
inst✝ : SemilatticeInf α
a b c : α
⊢ Ioc a b ∩ Iic c = Ioc a (b ⊓ c)
Theorem: Monoid.exponent_min'
File: Mathlib/GroupTheory/Exponent.lean

tactic: rw [exponent, dif_pos]
state_before: G : Type u
inst✝ : Monoid G
n : ℕ
hpos : 0 < n
hG : ∀ (g : G), g ^ n = 1
⊢ exponent G ≤ n

tactic: apply Nat.find_min'
state_before: G : Type u
inst✝ : Monoid G
n : ℕ
hpos : 0 < n
hG : ∀ (g : G), g ^ n = 1
⊢ Nat.find ?hc ≤ n

tactic: exact ⟨hpos, hG⟩
state_before: case h
G : Type u
inst✝ : Monoid G
n : ℕ
hpos : 0 < n
hG : ∀ (g : G), g ^ n = 1
⊢ 0 < n ∧ ∀ (g : G), g ^ n = 1

tactic: exact ⟨n, hpos, hG⟩
state_before: case hc
G : Type u
inst✝ : Monoid G
n : ℕ
hpos : 0 < n
hG : ∀ (g : G), g ^ n = 1
⊢ ExponentExists G
Theorem: Filter.tendsto_of_isEmpty
File: Mathlib/Order/Filter/Basic.lean

tactic: simp only [filter_eq_bot_of_isEmpty la, tendsto_bot]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.308632
ι : Sort x
inst✝ : IsEmpty α
f : α → β
la : Filter α
lb : Filter β
⊢ Tendsto f la lb
Theorem: dist_pi_le_iff'
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: by_cases hr : 0 ≤ r
state_before: α : Type u
β : Type v
X : Type ?u.395267
ι : Type ?u.395270
inst✝³ : PseudoMetricSpace α
π : β → Type u_1
inst✝² : Fintype β
inst✝¹ : (b : β) → PseudoMetricSpace (π b)
inst✝ : Nonempty β
f g : (b : β) → π b
r : ℝ
⊢ dist f g ≤ r ↔ ∀ (b : β), dist (f b) (g b) ≤ r

tactic: exact dist_pi_le_iff hr
state_before: case pos
α : Type u
β : Type v
X : Type ?u.395267
ι : Type ?u.395270
inst✝³ : PseudoMetricSpace α
π : β → Type u_1
inst✝² : Fintype β
inst✝¹ : (b : β) → PseudoMetricSpace (π b)
inst✝ : Nonempty β
f g : (b : β) → π b
r : ℝ
hr : 0 ≤ r
⊢ dist f g ≤ r ↔ ∀ (b : β), dist (f b) (g b) ≤ r

tactic: exact iff_of_false (fun h => hr <| dist_nonneg.trans h) fun h =>
  hr <| dist_nonneg.trans <| h <| Classical.arbitrary _
state_before: case neg
α : Type u
β : Type v
X : Type ?u.395267
ι : Type ?u.395270
inst✝³ : PseudoMetricSpace α
π : β → Type u_1
inst✝² : Fintype β
inst✝¹ : (b : β) → PseudoMetricSpace (π b)
inst✝ : Nonempty β
f g : (b : β) → π b
r : ℝ
hr : ¬0 ≤ r
⊢ dist f g ≤ r ↔ ∀ (b : β), dist (f b) (g b) ≤ r
Theorem: Bool.not_and_self
File: Mathlib/Data/Bool/Basic.lean

tactic: decide
state_before: ⊢ ∀ (x : Bool), (!x && x) = false
Theorem: Int.negOfNat_add
File: Std/Data/Int/Lemmas.lean

tactic: cases m <;> cases n <;> simp [Nat.succ_add] <;> rfl
state_before: m n : Nat
⊢ negOfNat m + negOfNat n = negOfNat (m + n)
Theorem: IsPrimitiveRoot.card_nthRootsFinset
File: Mathlib/RingTheory/RootsOfUnity/Basic.lean

tactic: rw [nthRootsFinset, ← Multiset.toFinset_eq (nthRoots_nodup h), card_mk, h.card_nthRoots]
state_before: M : Type ?u.3632058
N : Type ?u.3632061
G : Type ?u.3632064
R : Type u_1
S : Type ?u.3632070
F : Type ?u.3632073
inst✝⁴ : CommMonoid M
inst✝³ : CommMonoid N
inst✝² : DivisionCommMonoid G
k l : ℕ
inst✝¹ : CommRing R
ζ✝ : Rˣ
h✝ : IsPrimitiveRoot ζ✝ k
inst✝ : IsDomain R
ζ : R
n : ℕ
h : IsPrimitiveRoot ζ n
⊢ card (nthRootsFinset n R) = n
Theorem: smul_add_one_sub_smul
File: Mathlib/Algebra/Module/Basic.lean

tactic: rw [← add_smul, add_sub_cancel'_right, one_smul]
state_before: α : Type ?u.67416
R✝ : Type ?u.67419
k : Type ?u.67422
S : Type ?u.67425
M : Type u_2
M₂ : Type ?u.67431
M₃ : Type ?u.67434
ι : Type ?u.67437
inst✝⁴ : Semiring R✝
inst✝³ : AddCommMonoid M
inst✝² : Module R✝ M
r✝ s : R✝
x y : M
R : Type u_1
inst✝¹ : Ring R
inst✝ : Module R M
r : R
m : M
⊢ r • m + (1 - r) • m = m
Theorem: odd_abs
File: Mathlib/Algebra/Parity.lean

tactic: cases' abs_choice a with h h <;> simp only [h, odd_neg]
state_before: F : Type ?u.105789
α : Type u_1
β : Type ?u.105795
R : Type ?u.105798
inst✝¹ : Ring α
a b : α
n : ℕ
inst✝ : LinearOrder α
⊢ Odd (abs a) ↔ Odd a
Theorem: HomologicalComplex.kernel_from_eq_kernel
File: Mathlib/Algebra/Homology/HomologicalComplex.lean

tactic: rw [C.dFrom_eq r]
state_before: ι : Type u_1
V : Type u
inst✝² : Category V
inst✝¹ : HasZeroMorphisms V
c : ComplexShape ι
C : HomologicalComplex V c
inst✝ : HasKernels V
i j : ι
r : ComplexShape.Rel c i j
⊢ kernelSubobject (dFrom C i) = kernelSubobject (d C i j)

tactic: apply kernelSubobject_comp_mono
state_before: ι : Type u_1
V : Type u
inst✝² : Category V
inst✝¹ : HasZeroMorphisms V
c : ComplexShape ι
C : HomologicalComplex V c
inst✝ : HasKernels V
i j : ι
r : ComplexShape.Rel c i j
⊢ kernelSubobject (d C i j ≫ (xNextIso C r).inv) = kernelSubobject (d C i j)
Theorem: tendsto_atBot_ciInf
File: Mathlib/Topology/Algebra/Order/MonotoneConvergence.lean

tactic: convert tendsto_atTop_ciSup h_mono.dual hbdd.dual using 1
state_before: α : Type u_2
β : Type ?u.22872
ι : Type u_1
inst✝³ : Preorder ι
inst✝² : TopologicalSpace α
inst✝¹ : ConditionallyCompleteLattice α
inst✝ : InfConvergenceClass α
f : ι → α
a : α
h_mono : Monotone f
hbdd : BddBelow (range f)
⊢ Tendsto f atBot (𝓝 (⨅ (i : ι), f i))
Theorem: FreeCommRing.lift_comp_of
File: Mathlib/RingTheory/FreeCommRing.lean

tactic: rw [RingHom.map_neg, RingHom.map_one, f.map_neg, f.map_one]
state_before: α : Type u
R : Type v
inst✝ : CommRing R
f✝ : α → R
f : FreeCommRing α →+* R
x : FreeCommRing α
⊢ ↑(↑lift (↑f ∘ of)) (-1) = ↑f (-1)

tactic: rw [RingHom.map_add, f.map_add, ihx, ihy]
state_before: α : Type u
R : Type v
inst✝ : CommRing R
f✝ : α → R
f : FreeCommRing α →+* R
x✝ x y : FreeCommRing α
ihx : ↑(↑lift (↑f ∘ of)) x = ↑f x
ihy : ↑(↑lift (↑f ∘ of)) y = ↑f y
⊢ ↑(↑lift (↑f ∘ of)) (x + y) = ↑f (x + y)

tactic: rw [RingHom.map_mul, f.map_mul, ihx, ihy]
state_before: α : Type u
R : Type v
inst✝ : CommRing R
f✝ : α → R
f : FreeCommRing α →+* R
x✝ x y : FreeCommRing α
ihx : ↑(↑lift (↑f ∘ of)) x = ↑f x
ihy : ↑(↑lift (↑f ∘ of)) y = ↑f y
⊢ ↑(↑lift (↑f ∘ of)) (x * y) = ↑f (x * y)
Theorem: Homotopy.nullHomotopicMap'_f_of_not_rel_left
File: Mathlib/Algebra/Homology/Homotopy.lean

tactic: simp only [nullHomotopicMap']
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h✝ k : D ⟶ E
i k₁ k₀ : ι
r₁₀ : ComplexShape.Rel c k₁ k₀
hk₀ : ∀ (l : ι), ¬ComplexShape.Rel c k₀ l
h : (i j : ι) → ComplexShape.Rel c j i → (X C i ⟶ X D j)
⊢ Hom.f (nullHomotopicMap' h) k₀ = h k₀ k₁ r₁₀ ≫ d D k₁ k₀

tactic: rw [nullHomotopicMap_f_of_not_rel_left r₁₀ hk₀]
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h✝ k : D ⟶ E
i k₁ k₀ : ι
r₁₀ : ComplexShape.Rel c k₁ k₀
hk₀ : ∀ (l : ι), ¬ComplexShape.Rel c k₀ l
h : (i j : ι) → ComplexShape.Rel c j i → (X C i ⟶ X D j)
⊢ Hom.f (nullHomotopicMap fun i j => dite (ComplexShape.Rel c j i) (h i j) fun x => 0) k₀ = h k₀ k₁ r₁₀ ≫ d D k₁ k₀

tactic: dsimp
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h✝ k : D ⟶ E
i k₁ k₀ : ι
r₁₀ : ComplexShape.Rel c k₁ k₀
hk₀ : ∀ (l : ι), ¬ComplexShape.Rel c k₀ l
h : (i j : ι) → ComplexShape.Rel c j i → (X C i ⟶ X D j)
⊢ (dite (ComplexShape.Rel c k₁ k₀) (h k₀ k₁) fun x => 0) ≫ d D k₁ k₀ = h k₀ k₁ r₁₀ ≫ d D k₁ k₀

tactic: split_ifs
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h✝ k : D ⟶ E
i k₁ k₀ : ι
r₁₀ : ComplexShape.Rel c k₁ k₀
hk₀ : ∀ (l : ι), ¬ComplexShape.Rel c k₀ l
h : (i j : ι) → ComplexShape.Rel c j i → (X C i ⟶ X D j)
⊢ (dite (ComplexShape.Rel c k₁ k₀) (h k₀ k₁) fun x => 0) ≫ d D k₁ k₀ = h k₀ k₁ r₁₀ ≫ d D k₁ k₀

tactic: rfl
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g : C ⟶ D
h✝ k : D ⟶ E
i k₁ k₀ : ι
r₁₀ : ComplexShape.Rel c k₁ k₀
hk₀ : ∀ (l : ι), ¬ComplexShape.Rel c k₀ l
h : (i j : ι) → ComplexShape.Rel c j i → (X C i ⟶ X D j)
⊢ h k₀ k₁ r₁₀ ≫ d D k₁ k₀ = h k₀ k₁ r₁₀ ≫ d D k₁ k₀
Theorem: Rat.ofScientific_def
File: Std/Data/Rat/Lemmas.lean

tactic: cases s
state_before: m : Nat
s : Bool
e : Nat
⊢ Rat.ofScientific m s e = if s = true then mkRat (↑m) (10 ^ e) else ↑↑(m * 10 ^ e)

tactic: exact ofScientific_false_def
state_before: case false
m e : Nat
⊢ Rat.ofScientific m false e = if false = true then mkRat (↑m) (10 ^ e) else ↑↑(m * 10 ^ e)

case true
m e : Nat
⊢ Rat.ofScientific m true e = if true = true then mkRat (↑m) (10 ^ e) else ↑↑(m * 10 ^ e)

tactic: exact ofScientific_true_def
state_before: case true
m e : Nat
⊢ Rat.ofScientific m true e = if true = true then mkRat (↑m) (10 ^ e) else ↑↑(m * 10 ^ e)
Theorem: LieAlgebra.Orthogonal.s_as_blocks
File: Mathlib/Algebra/Lie/Classical.lean

tactic: rw [← Matrix.diagonal_one, Matrix.diagonal_neg, Matrix.fromBlocks_diagonal]
state_before: n : Type ?u.106667
p : Type ?u.106670
q : Type ?u.106673
l : Type u_1
R : Type u₂
inst✝⁶ : DecidableEq n
inst✝⁵ : DecidableEq p
inst✝⁴ : DecidableEq q
inst✝³ : DecidableEq l
inst✝² : CommRing R
inst✝¹ : Fintype p
inst✝ : Fintype q
⊢ S l R = fromBlocks 1 0 0 (-1)

tactic: rfl
state_before: n : Type ?u.106667
p : Type ?u.106670
q : Type ?u.106673
l : Type u_1
R : Type u₂
inst✝⁶ : DecidableEq n
inst✝⁵ : DecidableEq p
inst✝⁴ : DecidableEq q
inst✝³ : DecidableEq l
inst✝² : CommRing R
inst✝¹ : Fintype p
inst✝ : Fintype q
⊢ S l R = diagonal (Sum.elim (fun x => 1) fun i => -1)
Theorem: Nat.mul_right_comm
File: Std/Data/Nat/Lemmas.lean

tactic: rw [Nat.mul_assoc, Nat.mul_comm m, ← Nat.mul_assoc]
state_before: n m k : Nat
⊢ n * m * k = n * k * m
Theorem: RingQuot.ringQuot_ext
File: Mathlib/Algebra/RingQuot.lean

tactic: ext x
state_before: R : Type u₁
inst✝⁴ : Semiring R
S : Type u₂
inst✝³ : CommSemiring S
A : Type u₃
inst✝² : Semiring A
inst✝¹ : Algebra S A
r✝ : R → R → Prop
T : Type u₄
inst✝ : Semiring T
r : R → R → Prop
f g : RingQuot r →+* T
w : RingHom.comp f (mkRingHom r) = RingHom.comp g (mkRingHom r)
⊢ f = g

tactic: rcases mkRingHom_surjective r x with ⟨x, rfl⟩
state_before: case a
R : Type u₁
inst✝⁴ : Semiring R
S : Type u₂
inst✝³ : CommSemiring S
A : Type u₃
inst✝² : Semiring A
inst✝¹ : Algebra S A
r✝ : R → R → Prop
T : Type u₄
inst✝ : Semiring T
r : R → R → Prop
f g : RingQuot r →+* T
w : RingHom.comp f (mkRingHom r) = RingHom.comp g (mkRingHom r)
x : RingQuot r
⊢ ↑f x = ↑g x

tactic: exact (RingHom.congr_fun w x : _)
state_before: case a.intro
R : Type u₁
inst✝⁴ : Semiring R
S : Type u₂
inst✝³ : CommSemiring S
A : Type u₃
inst✝² : Semiring A
inst✝¹ : Algebra S A
r✝ : R → R → Prop
T : Type u₄
inst✝ : Semiring T
r : R → R → Prop
f g : RingQuot r →+* T
w : RingHom.comp f (mkRingHom r) = RingHom.comp g (mkRingHom r)
x : R
⊢ ↑f (↑(mkRingHom r) x) = ↑g (↑(mkRingHom r) x)
Theorem: JordanHolderLattice.second_iso_of_eq
File: Mathlib/Order/JordanHolder.lean

tactic: substs a b
state_before: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
x y a b : X
hm : IsMaximal x a
ha : x ⊔ y = a
hb : x ⊓ y = b
⊢ Iso (x, a) (b, y)

tactic: exact second_iso hm
state_before: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
x y : X
hm : IsMaximal x (x ⊔ y)
⊢ Iso (x, x ⊔ y) (x ⊓ y, y)
Theorem: Basis.coe_toOrthonormalBasis
File: Mathlib/Analysis/InnerProductSpace/PiL2.lean

tactic: classical rw [OrthonormalBasis.coe_toBasis]
state_before: ι : Type u_1
ι' : Type ?u.1157885
𝕜 : Type u_2
inst✝⁹ : IsROrC 𝕜
E : Type u_3
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
E' : Type ?u.1157914
inst✝⁶ : NormedAddCommGroup E'
inst✝⁵ : InnerProductSpace 𝕜 E'
F : Type ?u.1157932
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
F' : Type ?u.1157952
inst✝² : NormedAddCommGroup F'
inst✝¹ : InnerProductSpace ℝ F'
inst✝ : Fintype ι
v : Basis ι 𝕜 E
hv : Orthonormal 𝕜 ↑v
⊢ ↑(Basis.toOrthonormalBasis v hv) = ↑(OrthonormalBasis.toBasis (Basis.toOrthonormalBasis v hv))

tactic: rw [OrthonormalBasis.coe_toBasis]
state_before: ι : Type u_1
ι' : Type ?u.1157885
𝕜 : Type u_2
inst✝⁹ : IsROrC 𝕜
E : Type u_3
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
E' : Type ?u.1157914
inst✝⁶ : NormedAddCommGroup E'
inst✝⁵ : InnerProductSpace 𝕜 E'
F : Type ?u.1157932
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
F' : Type ?u.1157952
inst✝² : NormedAddCommGroup F'
inst✝¹ : InnerProductSpace ℝ F'
inst✝ : Fintype ι
v : Basis ι 𝕜 E
hv : Orthonormal 𝕜 ↑v
⊢ ↑(Basis.toOrthonormalBasis v hv) = ↑(OrthonormalBasis.toBasis (Basis.toOrthonormalBasis v hv))

tactic: simp
state_before: ι : Type u_1
ι' : Type ?u.1157885
𝕜 : Type u_2
inst✝⁹ : IsROrC 𝕜
E : Type u_3
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
E' : Type ?u.1157914
inst✝⁶ : NormedAddCommGroup E'
inst✝⁵ : InnerProductSpace 𝕜 E'
F : Type ?u.1157932
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
F' : Type ?u.1157952
inst✝² : NormedAddCommGroup F'
inst✝¹ : InnerProductSpace ℝ F'
inst✝ : Fintype ι
v : Basis ι 𝕜 E
hv : Orthonormal 𝕜 ↑v
⊢ ↑(OrthonormalBasis.toBasis (Basis.toOrthonormalBasis v hv)) = ↑v
Theorem: SimpleGraph.edge_other_ne
File: Mathlib/Combinatorics/SimpleGraph/Basic.lean

tactic: erw [← Sym2.other_spec h, Sym2.eq_swap] at he
state_before: ι : Sort ?u.72658
𝕜 : Type ?u.72661
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v✝ w : V
e✝ : Sym2 V
G₁ G₂ : SimpleGraph V
e : Sym2 V
he : e ∈ edgeSet G
v : V
h : v ∈ e
⊢ Sym2.Mem.other h ≠ v

tactic: exact G.ne_of_adj he
state_before: ι : Sort ?u.72658
𝕜 : Type ?u.72661
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v✝ w : V
e✝ : Sym2 V
G₁ G₂ : SimpleGraph V
e : Sym2 V
v : V
h : v ∈ e
he : Quotient.mk (Sym2.Rel.setoid V) (Sym2.Mem.other h, v) ∈ edgeSet G
⊢ Sym2.Mem.other h ≠ v
Theorem: Nat.modEq_iff_dvd
File: Mathlib/Data/Nat/ModEq.lean

tactic: rw [ModEq, eq_comm, ← Int.coe_nat_inj', Int.coe_nat_mod, Int.coe_nat_mod,
  Int.emod_eq_emod_iff_emod_sub_eq_zero, Int.dvd_iff_emod_eq_zero]
state_before: m n a b c d : ℕ
⊢ a ≡ b [MOD n] ↔ ↑n ∣ ↑b - ↑a
Theorem: Finsupp.cons_ne_zero_of_right
File: Mathlib/Data/Finsupp/Fin.lean

tactic: contrapose! h with c
state_before: n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
h : s ≠ 0
⊢ cons y s ≠ 0

tactic: ext a
state_before: n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
c : cons y s = 0
⊢ s = 0

tactic: simp [← cons_succ a y s, c]
state_before: case h
n : ℕ
i : Fin n
M : Type u_1
inst✝ : Zero M
y : M
t : Fin (n + 1) →₀ M
s : Fin n →₀ M
c : cons y s = 0
a : Fin n
⊢ ↑s a = ↑0 a
Theorem: finrank_orthogonal_span_singleton
File: Mathlib/Analysis/InnerProductSpace/Projection.lean

tactic: haveI : FiniteDimensional 𝕜 E := fact_finiteDimensional_of_finrank_eq_succ n
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.1016275
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
n : ℕ
_i : Fact (finrank 𝕜 E = n + 1)
v : E
hv : v ≠ 0
⊢ finrank 𝕜 { x // x ∈ (Submodule.span 𝕜 {v})ᗮ } = n

tactic: exact Submodule.finrank_add_finrank_orthogonal' <| by
  simp [finrank_span_singleton hv, _i.elim, add_comm]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.1016275
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
n : ℕ
_i : Fact (finrank 𝕜 E = n + 1)
v : E
hv : v ≠ 0
this : FiniteDimensional 𝕜 E
⊢ finrank 𝕜 { x // x ∈ (Submodule.span 𝕜 {v})ᗮ } = n

tactic: simp [finrank_span_singleton hv, _i.elim, add_comm]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.1016275
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : InnerProductSpace 𝕜 E
inst✝ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
n : ℕ
_i : Fact (finrank 𝕜 E = n + 1)
v : E
hv : v ≠ 0
this : FiniteDimensional 𝕜 E
⊢ finrank 𝕜 { x // x ∈ Submodule.span 𝕜 {v} } + n = finrank 𝕜 E
Theorem: TensorProduct.tensorTensorTensorComm_symm
File: Mathlib/LinearAlgebra/TensorProduct.lean

tactic: ext
state_before: R : Type u_5
inst✝¹⁴ : CommSemiring R
R' : Type ?u.1128882
inst✝¹³ : Monoid R'
R'' : Type ?u.1128888
inst✝¹² : Semiring R''
M : Type u_1
N : Type u_2
P : Type u_3
Q : Type u_4
S : Type ?u.1128906
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid N
inst✝⁹ : AddCommMonoid P
inst✝⁸ : AddCommMonoid Q
inst✝⁷ : AddCommMonoid S
inst✝⁶ : Module R M
inst✝⁵ : Module R N
inst✝⁴ : Module R P
inst✝³ : Module R Q
inst✝² : Module R S
inst✝¹ : DistribMulAction R' M
inst✝ : Module R'' M
⊢ LinearEquiv.symm (tensorTensorTensorComm R M N P Q) = tensorTensorTensorComm R M P N Q

tactic: rfl
state_before: case h
R : Type u_5
inst✝¹⁴ : CommSemiring R
R' : Type ?u.1128882
inst✝¹³ : Monoid R'
R'' : Type ?u.1128888
inst✝¹² : Semiring R''
M : Type u_1
N : Type u_2
P : Type u_3
Q : Type u_4
S : Type ?u.1128906
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid N
inst✝⁹ : AddCommMonoid P
inst✝⁸ : AddCommMonoid Q
inst✝⁷ : AddCommMonoid S
inst✝⁶ : Module R M
inst✝⁵ : Module R N
inst✝⁴ : Module R P
inst✝³ : Module R Q
inst✝² : Module R S
inst✝¹ : DistribMulAction R' M
inst✝ : Module R'' M
x✝ : (M ⊗[R] P) ⊗[R] N ⊗[R] Q
⊢ ↑(LinearEquiv.symm (tensorTensorTensorComm R M N P Q)) x✝ = ↑(tensorTensorTensorComm R M P N Q) x✝
Theorem: Finpartition.card_parts_equitabilise
File: Mathlib/Combinatorics/SimpleGraph/Regularity/Equitabilise.lean

tactic: rw [← filter_true_of_mem fun x => card_eq_of_mem_parts_equitabilise, filter_or, card_union_eq,
  P.card_filter_equitabilise_small _ hm, P.card_filter_equitabilise_big]
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
m n a b : ℕ
P : Finpartition s
h : a * m + b * (m + 1) = card s
hm : m ≠ 0
⊢ card (equitabilise h).parts = a + b

tactic: exact disjoint_filter.2 fun x _ h₀ h₁ => Nat.succ_ne_self m <| h₁.symm.trans h₀
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
m n a b : ℕ
P : Finpartition s
h : a * m + b * (m + 1) = card s
hm : m ≠ 0
⊢ Disjoint (filter (fun x => card x = m) (equitabilise h).parts)
    (filter (fun x => card x = m + 1) (equitabilise h).parts)
Theorem: List.Nat.mem_antidiagonalTuple
File: Mathlib/Data/Fin/Tuple/NatAntidiagonal.lean

tactic: cases n
state_before: case h0
k n : ℕ
⊢ Fin.elim0 ∈ antidiagonalTuple 0 n ↔ ∑ i : Fin 0, Fin.elim0 i = n

tactic: simp
state_before: case h0.zero
k : ℕ
⊢ Fin.elim0 ∈ antidiagonalTuple 0 Nat.zero ↔ ∑ i : Fin 0, Fin.elim0 i = Nat.zero

tactic: simp [eq_comm]
state_before: case h0.succ
k n✝ : ℕ
⊢ Fin.elim0 ∈ antidiagonalTuple 0 (Nat.succ n✝) ↔ ∑ i : Fin 0, Fin.elim0 i = Nat.succ n✝

tactic: simp_rw [Fin.sum_cons]
state_before: case h
k n✝ x₀ : ℕ
x : Fin n✝ → ℕ
ih : ∀ {n : ℕ}, x ∈ antidiagonalTuple n✝ n ↔ ∑ i : Fin n✝, x i = n
n : ℕ
⊢ Fin.cons x₀ x ∈ antidiagonalTuple (n✝ + 1) n ↔ ∑ i : Fin (n✝ + 1), Fin.cons x₀ x i = n

tactic: rw [antidiagonalTuple]
state_before: case h
k n✝ x₀ : ℕ
x : Fin n✝ → ℕ
ih : ∀ {n : ℕ}, x ∈ antidiagonalTuple n✝ n ↔ ∑ i : Fin n✝, x i = n
n : ℕ
⊢ Fin.cons x₀ x ∈ antidiagonalTuple (n✝ + 1) n ↔ x₀ + ∑ i : Fin n✝, x i = n

tactic: simp_rw [List.mem_bind, List.mem_map,
  List.Nat.mem_antidiagonal, Fin.cons_eq_cons, exists_eq_right_right, ih,
  @eq_comm _ _ (Prod.snd _), and_comm (a := Prod.snd _ = _),
  ←Prod.mk.inj_iff (a₁ := Prod.fst _), Prod.mk.eta, exists_eq_right]
state_before: case h
k n✝ x₀ : ℕ
x : Fin n✝ → ℕ
ih : ∀ {n : ℕ}, x ∈ antidiagonalTuple n✝ n ↔ ∑ i : Fin n✝, x i = n
n : ℕ
⊢ (Fin.cons x₀ x ∈
      List.bind (antidiagonal n) fun ni => map (fun x => Fin.cons ni.fst x) (antidiagonalTuple n✝ ni.snd)) ↔
    x₀ + ∑ i : Fin n✝, x i = n
Theorem: Int.eq_one_or_neg_one_of_mul_eq_neg_one'
File: Mathlib/Data/Int/Units.lean

tactic: rcases isUnit_eq_one_or (IsUnit.mul_iff.mp (Int.isUnit_iff.mpr (Or.inr h))).1 with (rfl | rfl)
state_before: z w : ℤ
h : z * w = -1
⊢ z = 1 ∧ w = -1 ∨ z = -1 ∧ w = 1

tactic: exact Or.inl ⟨rfl, one_mul w ▸ h⟩
state_before: case inl
w : ℤ
h : 1 * w = -1
⊢ 1 = 1 ∧ w = -1 ∨ 1 = -1 ∧ w = 1

tactic: exact Or.inr ⟨rfl, neg_inj.mp (neg_one_mul w ▸ h)⟩
state_before: case inr
w : ℤ
h : -1 * w = -1
⊢ -1 = 1 ∧ w = -1 ∨ -1 = -1 ∧ w = 1
Theorem: ContinuousMap.compactOpen_le_induced
File: Mathlib/Topology/CompactOpen.lean

tactic: simp only [induced_generateFrom_eq, ContinuousMap.compactOpen]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.16761
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Set α
⊢ compactOpen ≤ TopologicalSpace.induced (restrict s) compactOpen

tactic: apply TopologicalSpace.generateFrom_anti
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.16761
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Set α
⊢ TopologicalSpace.generateFrom {m | ∃ s x u x, m = CompactOpen.gen s u} ≤
    TopologicalSpace.generateFrom (preimage (restrict s) '' {m | ∃ s_1 x u x, m = CompactOpen.gen s_1 u})

tactic: rintro b ⟨a, ⟨c, hc, u, hu, rfl⟩, rfl⟩
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.16761
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Set α
⊢ preimage (restrict s) '' {m | ∃ s_1 x u x, m = CompactOpen.gen s_1 u} ⊆ {m | ∃ s x u x, m = CompactOpen.gen s u}

tactic: refine' ⟨(↑) '' c, hc.image continuous_subtype_val, u, hu, _⟩
state_before: case h.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type ?u.16761
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Set α
c : Set ↑s
hc : IsCompact c
u : Set β
hu : IsOpen u
⊢ restrict s ⁻¹' CompactOpen.gen c u ∈ {m | ∃ s x u x, m = CompactOpen.gen s u}

tactic: ext f
state_before: case h.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type ?u.16761
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Set α
c : Set ↑s
hc : IsCompact c
u : Set β
hu : IsOpen u
⊢ restrict s ⁻¹' CompactOpen.gen c u = CompactOpen.gen (Subtype.val '' c) u

tactic: simp only [CompactOpen.gen, mem_setOf_eq, mem_preimage, ContinuousMap.coe_restrict]
state_before: case h.intro.intro.intro.intro.intro.intro.h
α : Type u_1
β : Type u_2
γ : Type ?u.16761
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Set α
c : Set ↑s
hc : IsCompact c
u : Set β
hu : IsOpen u
f : C(α, β)
⊢ f ∈ restrict s ⁻¹' CompactOpen.gen c u ↔ f ∈ CompactOpen.gen (Subtype.val '' c) u

tactic: rw [image_comp f ((↑) : s → α)]
state_before: case h.intro.intro.intro.intro.intro.intro.h
α : Type u_1
β : Type u_2
γ : Type ?u.16761
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Set α
c : Set ↑s
hc : IsCompact c
u : Set β
hu : IsOpen u
f : C(α, β)
⊢ (fun a => (↑f ∘ Subtype.val) a) '' c ⊆ u ↔ (fun a => ↑f a) '' (Subtype.val '' c) ⊆ u
Theorem: Finset.uIcc_self
File: Mathlib/Data/Finset/LocallyFinite.lean

tactic: simp [uIcc]
state_before: ι : Type ?u.175396
α : Type u_1
inst✝¹ : Lattice α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ [[a, a]] = {a}