tasksource/leandojo huggingface dataset:
Theorem: Submodule.mkQ_surjective
File: Mathlib/LinearAlgebra/Quotient.lean

tactic: rintro ⟨x⟩
state_before: R : Type u_1
M : Type u_2
r : R
x y : M
inst✝⁴ : Ring R
inst✝³ : AddCommGroup M
inst✝² : Module R M
p p' : Submodule R M
M₂ : Type ?u.182338
inst✝¹ : AddCommGroup M₂
inst✝ : Module R M₂
A : Submodule R M
⊢ Function.Surjective ↑(mkQ A)

tactic: exact ⟨x, rfl⟩
state_before: case mk
R : Type u_1
M : Type u_2
r : R
x✝ y : M
inst✝⁴ : Ring R
inst✝³ : AddCommGroup M
inst✝² : Module R M
p p' : Submodule R M
M₂ : Type ?u.182338
inst✝¹ : AddCommGroup M₂
inst✝ : Module R M₂
A : Submodule R M
b✝ : M ⧸ A
x : M
⊢ ∃ a, ↑(mkQ A) a = Quot.mk Setoid.r x
Theorem: Cardinal.mul_le_max
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: rcases eq_or_ne a 0 with (rfl | ha0)
state_before: a b : Cardinal
⊢ a * b ≤ max (max a b) ℵ₀

tactic: rcases eq_or_ne b 0 with (rfl | hb0)
state_before: case inr
a b : Cardinal
ha0 : a ≠ 0
⊢ a * b ≤ max (max a b) ℵ₀

tactic: cases' le_or_lt ℵ₀ a with ha ha
state_before: case inr.inr
a b : Cardinal
ha0 : a ≠ 0
hb0 : b ≠ 0
⊢ a * b ≤ max (max a b) ℵ₀

tactic: simp
state_before: case inl
b : Cardinal
⊢ 0 * b ≤ max (max 0 b) ℵ₀

tactic: simp
state_before: case inr.inl
a : Cardinal
ha0 : a ≠ 0
⊢ a * 0 ≤ max (max a 0) ℵ₀

tactic: rw [mul_eq_max_of_aleph0_le_left ha hb0]
state_before: case inr.inr.inl
a b : Cardinal
ha0 : a ≠ 0
hb0 : b ≠ 0
ha : ℵ₀ ≤ a
⊢ a * b ≤ max (max a b) ℵ₀

tactic: exact le_max_left _ _
state_before: case inr.inr.inl
a b : Cardinal
ha0 : a ≠ 0
hb0 : b ≠ 0
ha : ℵ₀ ≤ a
⊢ max a b ≤ max (max a b) ℵ₀

tactic: cases' le_or_lt ℵ₀ b with hb hb
state_before: case inr.inr.inr
a b : Cardinal
ha0 : a ≠ 0
hb0 : b ≠ 0
ha : a < ℵ₀
⊢ a * b ≤ max (max a b) ℵ₀

tactic: rw [mul_comm, mul_eq_max_of_aleph0_le_left hb ha0, max_comm]
state_before: case inr.inr.inr.inl
a b : Cardinal
ha0 : a ≠ 0
hb0 : b ≠ 0
ha : a < ℵ₀
hb : ℵ₀ ≤ b
⊢ a * b ≤ max (max a b) ℵ₀

tactic: exact le_max_left _ _
state_before: case inr.inr.inr.inl
a b : Cardinal
ha0 : a ≠ 0
hb0 : b ≠ 0
ha : a < ℵ₀
hb : ℵ₀ ≤ b
⊢ max a b ≤ max (max a b) ℵ₀

tactic: exact le_max_of_le_right (mul_lt_aleph0 ha hb).le
state_before: case inr.inr.inr.inr
a b : Cardinal
ha0 : a ≠ 0
hb0 : b ≠ 0
ha : a < ℵ₀
hb : b < ℵ₀
⊢ a * b ≤ max (max a b) ℵ₀
Theorem: MvPolynomial.degreeOf_rename_of_injective
File: Mathlib/Data/MvPolynomial/Variables.lean

tactic: classical
simp only [degreeOf, degrees_rename_of_injective h, Multiset.count_map_eq_count' f p.degrees h]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p✝ q p : MvPolynomial σ R
f : σ → τ
h : Injective f
i : σ
⊢ degreeOf (f i) (↑(rename f) p) = degreeOf i p

tactic: simp only [degreeOf, degrees_rename_of_injective h, Multiset.count_map_eq_count' f p.degrees h]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p✝ q p : MvPolynomial σ R
f : σ → τ
h : Injective f
i : σ
⊢ degreeOf (f i) (↑(rename f) p) = degreeOf i p
Theorem: Preorder.ext
File: Mathlib/Order/Basic.lean

tactic: ext x y
state_before: ι : Type ?u.19676
α✝ : Type u
β : Type v
γ : Type w
π : ι → Type ?u.19687
r : α✝ → α✝ → Prop
α : Type u_1
A B : Preorder α
H : ∀ (x y : α), x ≤ y ↔ x ≤ y
⊢ A = B

tactic: exact H x y
state_before: case a.le.h.h.a
ι : Type ?u.19676
α✝ : Type u
β : Type v
γ : Type w
π : ι → Type ?u.19687
r : α✝ → α✝ → Prop
α : Type u_1
A B : Preorder α
H : ∀ (x y : α), x ≤ y ↔ x ≤ y
x y : α
⊢ x ≤ y ↔ x ≤ y
Theorem: Subtype.sizeOf
File: src/lean/Init/SizeOfLemmas.lean

tactic: cases s
state_before: α : Sort u_1
p : α → Prop
s : Subtype p
⊢ SizeOf.sizeOf s = SizeOf.sizeOf s.val + 1

tactic: simp_arith
state_before: case mk
α : Sort u_1
p : α → Prop
val✝ : α
property✝ : p val✝
⊢ SizeOf.sizeOf { val := val✝, property := property✝ } = SizeOf.sizeOf { val := val✝, property := property✝ }.val + 1
Theorem: Polynomial.div_eq_quo_add_rem_div
File: Mathlib/RingTheory/IntegralDomain.lean

tactic: refine' ⟨f /ₘ g, f %ₘ g, _, _⟩
state_before: R : Type u_1
G : Type ?u.275691
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : Group G
K : Type
inst✝² : Field K
inst✝¹ : Algebra R[X] K
inst✝ : IsFractionRing R[X] K
f g : R[X]
hg : Monic g
⊢ ∃ q r,
    degree r < degree g ∧
      ↑(algebraMap R[X] K) f / ↑(algebraMap R[X] K) g =
        ↑(algebraMap R[X] K) q + ↑(algebraMap R[X] K) r / ↑(algebraMap R[X] K) g

tactic: exact degree_modByMonic_lt _ hg
state_before: case refine'_1
R : Type u_1
G : Type ?u.275691
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : Group G
K : Type
inst✝² : Field K
inst✝¹ : Algebra R[X] K
inst✝ : IsFractionRing R[X] K
f g : R[X]
hg : Monic g
⊢ degree (f %ₘ g) < degree g

tactic: have hg' : algebraMap R[X] K g ≠ 0 :=
  (map_ne_zero_iff _ (IsFractionRing.injective R[X] K)).mpr (Monic.ne_zero hg)
state_before: case refine'_2
R : Type u_1
G : Type ?u.275691
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : Group G
K : Type
inst✝² : Field K
inst✝¹ : Algebra R[X] K
inst✝ : IsFractionRing R[X] K
f g : R[X]
hg : Monic g
⊢ ↑(algebraMap R[X] K) f / ↑(algebraMap R[X] K) g =
    ↑(algebraMap R[X] K) (f /ₘ g) + ↑(algebraMap R[X] K) (f %ₘ g) / ↑(algebraMap R[X] K) g

tactic: field_simp [hg']
state_before: case refine'_2
R : Type u_1
G : Type ?u.275691
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : Group G
K : Type
inst✝² : Field K
inst✝¹ : Algebra R[X] K
inst✝ : IsFractionRing R[X] K
f g : R[X]
hg : Monic g
hg' : ↑(algebraMap R[X] K) g ≠ 0
⊢ ↑(algebraMap R[X] K) f / ↑(algebraMap R[X] K) g =
    ↑(algebraMap R[X] K) (f /ₘ g) + ↑(algebraMap R[X] K) (f %ₘ g) / ↑(algebraMap R[X] K) g

tactic: rw [add_comm, mul_comm, ← map_mul, ← map_add, modByMonic_add_div f hg]
state_before: case refine'_2
R : Type u_1
G : Type ?u.275691
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : Group G
K : Type
inst✝² : Field K
inst✝¹ : Algebra R[X] K
inst✝ : IsFractionRing R[X] K
f g : R[X]
hg : Monic g
hg' : ↑(algebraMap R[X] K) g ≠ 0
⊢ ↑(algebraMap R[X] K) f = ↑(algebraMap R[X] K) (f /ₘ g) * ↑(algebraMap R[X] K) g + ↑(algebraMap R[X] K) (f %ₘ g)
Theorem: MvPolynomial.vars_add_subset
File: Mathlib/Data/MvPolynomial/Variables.lean

tactic: intro x hx
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.157002
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
p✝ q✝ : MvPolynomial σ R
inst✝ : DecidableEq σ
p q : MvPolynomial σ R
⊢ vars (p + q) ⊆ vars p ∪ vars q

tactic: simp only [vars_def, Finset.mem_union, Multiset.mem_toFinset] at hx⊢
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.157002
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
p✝ q✝ : MvPolynomial σ R
inst✝ : DecidableEq σ
p q : MvPolynomial σ R
x : σ
hx : x ∈ vars (p + q)
⊢ x ∈ vars p ∪ vars q

tactic: simpa using Multiset.mem_of_le (degrees_add _ _) hx
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.157002
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
p✝ q✝ : MvPolynomial σ R
inst✝ : DecidableEq σ
p q : MvPolynomial σ R
x : σ
hx : x ∈ degrees (p + q)
⊢ x ∈ degrees p ∨ x ∈ degrees q
Theorem: List.prefix_append_right_inj
File: Std/Data/List/Lemmas.lean

tactic: rw [append_assoc, append_right_inj]
state_before: α✝ : Type u_1
l₁ l₂ l r : List α✝
⊢ l ++ l₁ ++ r = l ++ l₂ ↔ l₁ ++ r = l₂
Theorem: Nat.sum_totient'
File: Mathlib/Data/Nat/Totient.lean

tactic: convert sum_totient _ using 1
state_before: n : ℕ
⊢ ∑ m in filter (fun x => x ∣ n) (range (succ n)), φ m = n

tactic: simp only [Nat.divisors, sum_filter, range_eq_Ico]
state_before: case h.e'_2
n : ℕ
⊢ ∑ m in filter (fun x => x ∣ n) (range (succ n)), φ m = Finset.sum (divisors n) φ

tactic: rw [sum_eq_sum_Ico_succ_bot] <;> simp
state_before: case h.e'_2
n : ℕ
⊢ (∑ a in Ico 0 (succ n), if a ∣ n then φ a else 0) = ∑ a in Ico 1 (n + 1), if a ∣ n then φ a else 0
Theorem: CategoryTheory.GrothendieckTopology.sheafificationWhiskerRightIso_hom_app
File: Mathlib/CategoryTheory/Sites/CompatibleSheafification.lean

tactic: dsimp [sheafificationWhiskerRightIso, sheafifyCompIso]
state_before: C : Type u
inst✝⁸ : Category C
J : GrothendieckTopology C
D : Type w₁
inst✝⁷ : Category D
E : Type w₂
inst✝⁶ : Category E
F : D ⥤ E
inst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D
inst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E
inst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F
inst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F
P : Cᵒᵖ ⥤ D
⊢ (sheafificationWhiskerRightIso J F).hom.app P = (sheafifyCompIso J F P).hom

tactic: simp only [Category.id_comp, Category.comp_id]
state_before: C : Type u
inst✝⁸ : Category C
J : GrothendieckTopology C
D : Type w₁
inst✝⁷ : Category D
E : Type w₂
inst✝⁶ : Category E
F : D ⥤ E
inst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D
inst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E
inst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F
inst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F
P : Cᵒᵖ ⥤ D
⊢ 𝟙 (plusObj J (plusObj J P) ⋙ F) ≫
      (plusCompIso J F (plusObj J P)).hom ≫
        (𝟙 (plusObj J (plusObj J P ⋙ F)) ≫ plusMap J (plusCompIso J F P).hom) ≫ 𝟙 (plusObj J (plusObj J (P ⋙ F))) =
    (plusCompIso J F (plusObj J P)).hom ≫ plusMap J (plusCompIso J F P).hom

tactic: erw [Category.id_comp]
state_before: C : Type u
inst✝⁸ : Category C
J : GrothendieckTopology C
D : Type w₁
inst✝⁷ : Category D
E : Type w₂
inst✝⁶ : Category E
F : D ⥤ E
inst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D
inst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E
inst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E
inst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F
inst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F
P : Cᵒᵖ ⥤ D
⊢ 𝟙 (plusObj J (plusObj J P) ⋙ F) ≫ (plusCompIso J F (plusObj J P)).hom ≫ plusMap J (plusCompIso J F P).hom =
    (plusCompIso J F (plusObj J P)).hom ≫ plusMap J (plusCompIso J F P).hom
Theorem: FirstOrder.Language.BoundedFormula.not_all_isQF
File: Mathlib/ModelTheory/Syntax.lean

tactic: cases' con with _ con
state_before: L : Language
L' : Language
M : Type w
N : Type ?u.113613
P : Type ?u.113616
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
γ : Type ?u.113644
n l : ℕ
φ✝ ψ : BoundedFormula L α l
θ : BoundedFormula L α (Nat.succ l)
v : α → M
xs : Fin l → M
φ : BoundedFormula L α (n + 1)
con : IsQF (all φ)
⊢ False

tactic: exact φ.not_all_isAtomic con
state_before: case of_isAtomic
L : Language
L' : Language
M : Type w
N : Type ?u.113613
P : Type ?u.113616
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
γ : Type ?u.113644
n l : ℕ
φ✝ ψ : BoundedFormula L α l
θ : BoundedFormula L α (Nat.succ l)
v : α → M
xs : Fin l → M
φ : BoundedFormula L α (n + 1)
con : IsAtomic (all φ)
⊢ False
Theorem: Set.Countable.substructure_closure
File: Mathlib/ModelTheory/Substructures.lean

tactic: haveI : Countable s := h.to_subtype
state_before: L : Language
M : Type w
N : Type ?u.35964
P : Type ?u.35967
inst✝³ : Structure L M
inst✝² : Structure L N
inst✝¹ : Structure L P
S : Substructure L M
s : Set M
inst✝ : Countable ((l : ℕ) × Functions L l)
h : Set.Countable s
⊢ Countable { x // x ∈ LowerAdjoint.toFun (closure L) s }

tactic: rw [← mk_le_aleph0_iff, ← lift_le_aleph0]
state_before: L : Language
M : Type w
N : Type ?u.35964
P : Type ?u.35967
inst✝³ : Structure L M
inst✝² : Structure L N
inst✝¹ : Structure L P
S : Substructure L M
s : Set M
inst✝ : Countable ((l : ℕ) × Functions L l)
h : Set.Countable s
this : Countable ↑s
⊢ Countable { x // x ∈ LowerAdjoint.toFun (closure L) s }

tactic: exact lift_card_closure_le_card_term.trans mk_le_aleph0
state_before: L : Language
M : Type w
N : Type ?u.35964
P : Type ?u.35967
inst✝³ : Structure L M
inst✝² : Structure L N
inst✝¹ : Structure L P
S : Substructure L M
s : Set M
inst✝ : Countable ((l : ℕ) × Functions L l)
h : Set.Countable s
this : Countable ↑s
⊢ lift (#{ x // x ∈ LowerAdjoint.toFun (closure L) s }) ≤ ℵ₀
Theorem: Pell.yn_modEq_a_sub_one
File: Mathlib/NumberTheory/PellMatiyasevic.lean

tactic: simp [Nat.ModEq.refl]
state_before: a : ℕ
a1 : 1 < a
⊢ yn a1 0 ≡ 0 [MOD a - 1]

tactic: simp [Nat.ModEq.refl]
state_before: a : ℕ
a1 : 1 < a
⊢ yn a1 1 ≡ 1 [MOD a - 1]

tactic: rw [yn_succ_succ, (by ring : n + 2 + n = 2 * (n + 1))]
state_before: a : ℕ
a1 : 1 < a
n : ℕ
⊢ yn a1 (n + 2) + yn a1 n ≡ n + 2 + n [MOD a - 1]

tactic: exact ((modEq_sub a1.le).mul_left 2).mul (yn_modEq_a_sub_one (n + 1))
state_before: a : ℕ
a1 : 1 < a
n : ℕ
⊢ 2 * a * yn a1 (n + 1) ≡ 2 * (n + 1) [MOD a - 1]

tactic: ring
state_before: a : ℕ
a1 : 1 < a
n : ℕ
⊢ n + 2 + n = 2 * (n + 1)
Theorem: Polynomial.degree_X_pow
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: rw [X_pow_eq_monomial, degree_monomial _ (one_ne_zero' R)]
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝¹ : Semiring R
inst✝ : Nontrivial R
p q : R[X]
n : ℕ
⊢ degree (X ^ n) = ↑n
Theorem: Int.succ_neg_succ
File: Mathlib/Data/Int/Basic.lean

tactic: rw [neg_succ, succ_pred]
state_before: a : ℤ
⊢ succ (-succ a) = -a
Theorem: FirstOrder.Language.Theory.IsComplete.models_not_iff
File: Mathlib/ModelTheory/Satisfiability.lean

tactic: cases' h.2 φ with hφ hφn
state_before: L : Language
T : Theory L
α : Type w
n : ℕ
h : IsComplete T
φ : Sentence L
⊢ T ⊨ᵇ Formula.not φ ↔ ¬T ⊨ᵇ φ

tactic: simp only [hφ, not_true, iff_false_iff]
state_before: case inl
L : Language
T : Theory L
α : Type w
n : ℕ
h : IsComplete T
φ : Sentence L
hφ : T ⊨ᵇ φ
⊢ T ⊨ᵇ Formula.not φ ↔ ¬T ⊨ᵇ φ

tactic: rw [models_sentence_iff, not_forall]
state_before: case inl
L : Language
T : Theory L
α : Type w
n : ℕ
h : IsComplete T
φ : Sentence L
hφ : T ⊨ᵇ φ
⊢ ¬T ⊨ᵇ Formula.not φ

tactic: refine' ⟨h.1.some, _⟩
state_before: case inl
L : Language
T : Theory L
α : Type w
n : ℕ
h : IsComplete T
φ : Sentence L
hφ : T ⊨ᵇ φ
⊢ ∃ x, ¬↑x ⊨ Formula.not φ

tactic: simp only [Sentence.realize_not, Classical.not_not]
state_before: case inl
L : Language
T : Theory L
α : Type w
n : ℕ
h : IsComplete T
φ : Sentence L
hφ : T ⊨ᵇ φ
⊢ ¬↑(Nonempty.some (_ : IsSatisfiable T)) ⊨ Formula.not φ

tactic: exact models_sentence_iff.1 hφ _
state_before: case inl
L : Language
T : Theory L
α : Type w
n : ℕ
h : IsComplete T
φ : Sentence L
hφ : T ⊨ᵇ φ
⊢ ↑(Nonempty.some (_ : IsSatisfiable T)) ⊨ φ

tactic: simp only [hφn, true_iff_iff]
state_before: case inr
L : Language
T : Theory L
α : Type w
n : ℕ
h : IsComplete T
φ : Sentence L
hφn : T ⊨ᵇ Formula.not φ
⊢ T ⊨ᵇ Formula.not φ ↔ ¬T ⊨ᵇ φ

tactic: intro hφ
state_before: case inr
L : Language
T : Theory L
α : Type w
n : ℕ
h : IsComplete T
φ : Sentence L
hφn : T ⊨ᵇ Formula.not φ
⊢ ¬T ⊨ᵇ φ

tactic: rw [models_sentence_iff] at *
state_before: case inr
L : Language
T : Theory L
α : Type w
n : ℕ
h : IsComplete T
φ : Sentence L
hφn : T ⊨ᵇ Formula.not φ
hφ : T ⊨ᵇ φ
⊢ False

tactic: exact hφn h.1.some (hφ _)
state_before: case inr
L : Language
T : Theory L
α : Type w
n : ℕ
h : IsComplete T
φ : Sentence L
hφn : ∀ (M : ModelType T), ↑M ⊨ Formula.not φ
hφ : ∀ (M : ModelType T), ↑M ⊨ φ
⊢ False
Theorem: Cardinal.blsub_lt_ord_of_isRegular
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: rwa [hc.cof_eq]
state_before: α : Type ?u.159211
r : α → α → Prop
o : Ordinal
f : (a : Ordinal) → a < o → Ordinal
c : Cardinal
hc : IsRegular c
ho : card o < c
⊢ card o < Ordinal.cof (ord c)
Theorem: Real.volume_Ioc
File: Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean

tactic: simp [volume_val]
state_before: ι : Type ?u.121824
inst✝ : Fintype ι
a b : ℝ
⊢ ↑↑volume (Ioc a b) = ofReal (b - a)
Theorem: isLUB_Ioo
File: Mathlib/Order/Bounds/Basic.lean

tactic: simpa only [dual_Ioo] using isGLB_Ioo hab.dual
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝³ : Preorder α
inst✝² : Preorder β
s t : Set α
a✝ b✝ : α
inst✝¹ : SemilatticeInf γ
inst✝ : DenselyOrdered γ
a b : γ
hab : a < b
⊢ IsLUB (Ioo a b) b
Theorem: IsUnit.exists_left_inv
File: Mathlib/Algebra/Group/Units.lean

tactic: rcases h with ⟨⟨a, b, _, hba⟩, rfl⟩
state_before: α : Type u
M : Type u_1
N : Type ?u.57084
inst✝ : Monoid M
a : M
h : IsUnit a
⊢ ∃ b, b * a = 1

tactic: exact ⟨b, hba⟩
state_before: case intro.mk
α : Type u
M : Type u_1
N : Type ?u.57084
inst✝ : Monoid M
a b : M
val_inv✝ : a * b = 1
hba : b * a = 1
⊢ ∃ b_1, b_1 * ↑{ val := a, inv := b, val_inv := val_inv✝, inv_val := hba } = 1
Theorem: Complex.abs_cos_add_sin_mul_I
File: Mathlib/Data/Complex/Exponential.lean

tactic: have := Real.sin_sq_add_cos_sq x
state_before: x : ℝ
⊢ ↑abs (cos ↑x + sin ↑x * I) = 1

tactic: simp_all [add_comm, abs, normSq, sq, sin_ofReal_re, cos_ofReal_re, mul_re]
state_before: x : ℝ
this : Real.sin x ^ 2 + Real.cos x ^ 2 = 1
⊢ ↑abs (cos ↑x + sin ↑x * I) = 1
Theorem: Order.isMax_iterate_succ_of_eq_of_lt
File: Mathlib/Order/SuccPred/Basic.lean

tactic: refine' max_of_succ_le (le_trans _ h_eq.symm.le)
state_before: α : Type u_1
inst✝¹ : Preorder α
inst✝ : SuccOrder α
a b : α
n m : ℕ
h_eq : (succ^[n]) a = (succ^[m]) a
h_lt : n < m
⊢ IsMax ((succ^[n]) a)

tactic: have : succ ((succ^[n]) a) = (succ^[n + 1]) a := by rw [Function.iterate_succ', comp]
state_before: α : Type u_1
inst✝¹ : Preorder α
inst✝ : SuccOrder α
a b : α
n m : ℕ
h_eq : (succ^[n]) a = (succ^[m]) a
h_lt : n < m
⊢ succ ((succ^[n]) a) ≤ (succ^[m]) a

tactic: rw [this]
state_before: α : Type u_1
inst✝¹ : Preorder α
inst✝ : SuccOrder α
a b : α
n m : ℕ
h_eq : (succ^[n]) a = (succ^[m]) a
h_lt : n < m
this : succ ((succ^[n]) a) = (succ^[n + 1]) a
⊢ succ ((succ^[n]) a) ≤ (succ^[m]) a

tactic: have h_le : n + 1 ≤ m := Nat.succ_le_of_lt h_lt
state_before: α : Type u_1
inst✝¹ : Preorder α
inst✝ : SuccOrder α
a b : α
n m : ℕ
h_eq : (succ^[n]) a = (succ^[m]) a
h_lt : n < m
this : succ ((succ^[n]) a) = (succ^[n + 1]) a
⊢ (succ^[n + 1]) a ≤ (succ^[m]) a

tactic: exact Monotone.monotone_iterate_of_le_map succ_mono (le_succ a) h_le
state_before: α : Type u_1
inst✝¹ : Preorder α
inst✝ : SuccOrder α
a b : α
n m : ℕ
h_eq : (succ^[n]) a = (succ^[m]) a
h_lt : n < m
this : succ ((succ^[n]) a) = (succ^[n + 1]) a
h_le : n + 1 ≤ m
⊢ (succ^[n + 1]) a ≤ (succ^[m]) a

tactic: rw [Function.iterate_succ', comp]
state_before: α : Type u_1
inst✝¹ : Preorder α
inst✝ : SuccOrder α
a b : α
n m : ℕ
h_eq : (succ^[n]) a = (succ^[m]) a
h_lt : n < m
⊢ succ ((succ^[n]) a) = (succ^[n + 1]) a
Theorem: Function.Surjective.sigma_map
File: Mathlib/Data/Sigma/Basic.lean

tactic: simp only [Function.Surjective, Sigma.forall, h₁.forall]
state_before: α : Type ?u.7362
α₁ : Type u_1
α₂ : Type u_2
β : α → Type ?u.7373
β₁ : α₁ → Type u_3
β₂ : α₂ → Type u_4
f₁ : α₁ → α₂
f₂ : (a : α₁) → β₁ a → β₂ (f₁ a)
h₁ : Surjective f₁
h₂ : ∀ (a : α₁), Surjective (f₂ a)
⊢ Surjective (Sigma.map f₁ f₂)

tactic: exact fun i ↦ (h₂ _).forall.2 fun x ↦ ⟨⟨i, x⟩, rfl⟩
state_before: α : Type ?u.7362
α₁ : Type u_1
α₂ : Type u_2
β : α → Type ?u.7373
β₁ : α₁ → Type u_3
β₂ : α₂ → Type u_4
f₁ : α₁ → α₂
f₂ : (a : α₁) → β₁ a → β₂ (f₁ a)
h₁ : Surjective f₁
h₂ : ∀ (a : α₁), Surjective (f₂ a)
⊢ ∀ (x : α₁) (b : β₂ (f₁ x)), ∃ a, Sigma.map f₁ f₂ a = { fst := f₁ x, snd := b }
Theorem: WithTop.preimage_coe_Icc
File: Mathlib/Data/Set/Intervals/WithBotTop.lean

tactic: simp [← Ici_inter_Iic]
state_before: α : Type u_1
inst✝ : PartialOrder α
a b : α
⊢ some ⁻¹' Icc ↑a ↑b = Icc a b
Theorem: DirectSum.coe_of_mul_apply_of_le
File: Mathlib/Algebra/DirectSum/Internal.lean

tactic: rw [eq_tsub_iff_add_eq_of_le h, add_comm]
state_before: ι : Type u_3
σ : Type u_2
S : Type ?u.381766
R : Type u_1
inst✝⁸ : DecidableEq ι
inst✝⁷ : Semiring R
inst✝⁶ : SetLike σ R
inst✝⁵ : AddSubmonoidClass σ R
A : ι → σ
inst✝⁴ : CanonicallyOrderedAddMonoid ι
inst✝³ : SetLike.GradedMonoid A
inst✝² : Sub ι
inst✝¹ : OrderedSub ι
inst✝ : ContravariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
i : ι
r : { x // x ∈ A i }
r' : ⨁ (i : ι), { x // x ∈ A i }
n : ι
h : i ≤ n
x : ι
⊢ i + x = n ↔ x = n - i
Theorem: CategoryTheory.Bicategory.leftUnitor_comp
File: Mathlib/CategoryTheory/Bicategory/Basic.lean

tactic: simp
state_before: B : Type u
inst✝ : Bicategory B
a b c d e : B
f : a ⟶ b
g : b ⟶ c
⊢ (λ_ (f ≫ g)).hom = (α_ (𝟙 a) f g).inv ≫ (λ_ f).hom ▷ g
Theorem: MeasureTheory.hasFiniteIntegral_iff_ofNNReal
File: Mathlib/MeasureTheory/Function/L1Space.lean

tactic: simp [hasFiniteIntegral_iff_norm]
state_before: α : Type u_1
β : Type ?u.702248
γ : Type ?u.702251
δ : Type ?u.702254
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f : α → ℝ≥0
⊢ (HasFiniteIntegral fun x => ↑(f x)) ↔ (∫⁻ (a : α), ↑(f a) ∂μ) < ⊤
Theorem: Matrix.det_vandermonde_ne_zero_iff
File: Mathlib/LinearAlgebra/Vandermonde.lean

tactic: unfold Function.Injective
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
v : Fin n → R
⊢ det (vandermonde v) ≠ 0 ↔ Function.Injective v

tactic: simp only [det_vandermonde_eq_zero_iff, Ne.def, not_exists, not_and, Classical.not_not]
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
v : Fin n → R
⊢ det (vandermonde v) ≠ 0 ↔ ∀ ⦃a₁ a₂ : Fin n⦄, v a₁ = v a₂ → a₁ = a₂
Theorem: List.count_tail
File: Mathlib/Data/List/Count.lean

tactic: rw [count_cons']
state_before: α : Type u_1
l : List α
inst✝ : DecidableEq α
head : α
tail : List α
a : α
h : 0 < length (head :: tail)
⊢ count a (List.tail (head :: tail)) =
    count a (head :: tail) - if a = get (head :: tail) { val := 0, isLt := h } then 1 else 0

tactic: split_ifs <;> simp at * <;> contradiction
state_before: α : Type u_1
l : List α
inst✝ : DecidableEq α
head : α
tail : List α
a : α
h : 0 < length (head :: tail)
⊢ count a (List.tail (head :: tail)) =
    (count a tail + if a = head then 1 else 0) - if a = get (head :: tail) { val := 0, isLt := h } then 1 else 0
Theorem: QuasiErgodic.ae_empty_or_univ'
File: Mathlib/Dynamics/Ergodic/Ergodic.lean

tactic: obtain ⟨t, h₀, h₁, h₂⟩ := hf.toQuasiMeasurePreserving.exists_preimage_eq_of_preimage_ae hs hs'
state_before: α : Type u_1
m : MeasurableSpace α
f : α → α
s : Set α
μ : MeasureTheory.Measure α
hf : QuasiErgodic f
hs : MeasurableSet s
hs' : f ⁻¹' s =ᶠ[ae μ] s
⊢ s =ᶠ[ae μ] ∅ ∨ s =ᶠ[ae μ] univ

tactic: rcases hf.ae_empty_or_univ h₀ h₂ with (h₃ | h₃) <;> [left; right] <;> exact ae_eq_trans h₁.symm h₃
state_before: case intro.intro.intro
α : Type u_1
m : MeasurableSpace α
f : α → α
s : Set α
μ : MeasureTheory.Measure α
hf : QuasiErgodic f
hs : MeasurableSet s
hs' : f ⁻¹' s =ᶠ[ae μ] s
t : Set α
h₀ : MeasurableSet t
h₁ : t =ᶠ[ae μ] s
h₂ : f ⁻¹' t = t
⊢ s =ᶠ[ae μ] ∅ ∨ s =ᶠ[ae μ] univ
Theorem: Substring.ValidFor.dropWhile
File: Std/Data/String/Lemmas.lean

tactic: simp only [Substring.dropWhile, takeWhileAux_of_valid]
state_before: l m r : List Char
p : Char → Bool
⊢ ValidFor (l ++ List.takeWhile p m) (List.dropWhile p m) r
    (Substring.dropWhile
      { str := { data := l ++ m ++ r }, startPos := { byteIdx := utf8Len l },
        stopPos := { byteIdx := utf8Len l + utf8Len m } }
      p)

tactic: refine' .of_eq .. <;> simp
state_before: l m r : List Char
p : Char → Bool
⊢ ValidFor (l ++ List.takeWhile p m) (List.dropWhile p m) r
    { str := { data := l ++ m ++ r }, startPos := { byteIdx := utf8Len l + utf8Len (List.takeWhile p m) },
      stopPos := { byteIdx := utf8Len l + utf8Len m } }

tactic: rw [Nat.add_assoc, ← utf8Len_append (m.takeWhile p), List.takeWhile_append_dropWhile]
state_before: case refine'_3
l m r : List Char
p : Char → Bool
⊢ utf8Len l + utf8Len m = utf8Len l + utf8Len (List.takeWhile p m) + utf8Len (List.dropWhile p m)
Theorem: CategoryTheory.cancel_epi_id
File: Mathlib/CategoryTheory/Category/Basic.lean

tactic: convert cancel_epi f
state_before: C : Type u
inst✝¹ : Category C
X Y Z : C
f : X ⟶ Y
inst✝ : Epi f
h : Y ⟶ Y
⊢ f ≫ h = f ↔ h = 𝟙 Y

tactic: simp
state_before: case h.e'_1.h.e'_3.h
C : Type u
inst✝¹ : Category C
X Y Z : C
f : X ⟶ Y
inst✝ : Epi f
h : Y ⟶ Y
⊢ f = f ≫ 𝟙 Y