tasksource/leandojo huggingface dataset:
Theorem: CancelMonoid.toLeftCancelMonoid_injective
File: Mathlib/Algebra/Group/Ext.lean

tactic: rintro ⟨⟩ ⟨⟩ h
state_before: M : Type u
⊢ Function.Injective (@toLeftCancelMonoid M)

tactic: congr
state_before: case mk.mk
M : Type u
toLeftCancelMonoid✝¹ : LeftCancelMonoid M
mul_right_cancel✝¹ : ∀ (a b c : M), a * b = c * b → a = c
toLeftCancelMonoid✝ : LeftCancelMonoid M
mul_right_cancel✝ : ∀ (a b c : M), a * b = c * b → a = c
h : toLeftCancelMonoid = toLeftCancelMonoid
⊢ mk mul_right_cancel✝¹ = mk mul_right_cancel✝
Theorem: Pmf.filter_apply
File: Mathlib/Probability/ProbabilityMassFunction/Constructions.lean

tactic: rw [filter, normalize_apply]
state_before: α : Type u_1
β : Type ?u.161365
γ : Type ?u.161368
p : Pmf α
s : Set α
h : ∃ a, a ∈ s ∧ a ∈ support p
a : α
⊢ ↑(filter p s h) a = Set.indicator s (↑p) a * (∑' (a' : α), Set.indicator s (↑p) a')⁻¹
Theorem: Set.sigma_singleton
File: Mathlib/Data/Set/Sigma.lean

tactic: ext ⟨x, y⟩
state_before: ι : Type u_1
ι' : Type ?u.6678
α : ι → Type u_2
β : ι → Type ?u.6688
s s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
u : Set ((i : ι) × α i)
x : (i : ι) × α i
i j : ι
a✝ : α i
a : (i : ι) → α i
⊢ (Set.Sigma s fun i => {a i}) = (fun i => { fst := i, snd := a i }) '' s

tactic: simp [and_left_comm, eq_comm]
state_before: case h.mk
ι : Type u_1
ι' : Type ?u.6678
α : ι → Type u_2
β : ι → Type ?u.6688
s s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
u : Set ((i : ι) × α i)
x✝ : (i : ι) × α i
i j : ι
a✝ : α i
a : (i : ι) → α i
x : ι
y : α x
⊢ ({ fst := x, snd := y } ∈ Set.Sigma s fun i => {a i}) ↔
    { fst := x, snd := y } ∈ (fun i => { fst := i, snd := a i }) '' s
Theorem: Prod.openSegment_subset
File: Mathlib/Analysis/Convex/Segment.lean

tactic: rintro z ⟨a, b, ha, hb, hab, hz⟩
state_before: 𝕜 : Type u_3
E : Type u_1
F : Type u_2
G : Type ?u.305510
ι : Type ?u.305513
π : ι → Type ?u.305518
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x y : E × F
⊢ openSegment 𝕜 x y ⊆ openSegment 𝕜 x.fst y.fst ×ˢ openSegment 𝕜 x.snd y.snd

tactic: exact ⟨⟨a, b, ha, hb, hab, congr_arg Prod.fst hz⟩, a, b, ha, hb, hab, congr_arg Prod.snd hz⟩
state_before: case intro.intro.intro.intro.intro
𝕜 : Type u_3
E : Type u_1
F : Type u_2
G : Type ?u.305510
ι : Type ?u.305513
π : ι → Type ?u.305518
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x y z : E × F
a b : 𝕜
ha : 0 < a
hb : 0 < b
hab : a + b = 1
hz : a • x + b • y = z
⊢ z ∈ openSegment 𝕜 x.fst y.fst ×ˢ openSegment 𝕜 x.snd y.snd
Theorem: Nat.gcdA_zero_right
File: Mathlib/Data/Int/GCD.lean

tactic: unfold gcdA xgcd
state_before: s : ℕ
h : s ≠ 0
⊢ gcdA s 0 = 1

tactic: obtain ⟨s, rfl⟩ := Nat.exists_eq_succ_of_ne_zero h
state_before: s : ℕ
h : s ≠ 0
⊢ (xgcdAux s 1 0 0 0 1).snd.fst = 1

tactic: rw [xgcdAux_succ]
state_before: case intro
s : ℕ
h : succ s ≠ 0
⊢ (xgcdAux (succ s) 1 0 0 0 1).snd.fst = 1

tactic: rfl
state_before: case intro
s : ℕ
h : succ s ≠ 0
⊢ (xgcdAux (0 % succ s) (0 - ↑0 / ↑(succ s) * 1) (1 - ↑0 / ↑(succ s) * 0) (succ s) 1 0).snd.fst = 1
Theorem: Equiv.Perm.card_support_cycleOf_pos_iff
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

tactic: rw [← two_le_card_support_cycleOf_iff, ← Nat.succ_le_iff]
state_before: ι : Type ?u.2442862
α : Type u_1
β : Type ?u.2442868
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y : α
⊢ 0 < card (support (cycleOf f x)) ↔ ↑f x ≠ x

tactic: exact ⟨fun h => Or.resolve_left h.eq_or_lt (card_support_ne_one _).symm, zero_lt_two.trans_le⟩
state_before: ι : Type ?u.2442862
α : Type u_1
β : Type ?u.2442868
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y : α
⊢ Nat.succ 0 ≤ card (support (cycleOf f x)) ↔ 2 ≤ card (support (cycleOf f x))
Theorem: Polynomial.monic_of_injective
File: Mathlib/Data/Polynomial/Monic.lean

tactic: apply hf
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝¹ : Semiring R
inst✝ : Semiring S
f : R →+* S
hf : Injective ↑f
p : R[X]
hp : Monic (map f p)
⊢ Monic p

tactic: rw [← leadingCoeff_of_injective hf, hp.leadingCoeff, f.map_one]
state_before: case a
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝¹ : Semiring R
inst✝ : Semiring S
f : R →+* S
hf : Injective ↑f
p : R[X]
hp : Monic (map f p)
⊢ ↑f (leadingCoeff p) = ↑f 1
Theorem: PartENat.toWithTop_le
File: Mathlib/Data/Nat/PartENat.lean

tactic: induction y using PartENat.casesOn generalizing hy
state_before: x y : PartENat
hx : Decidable x.Dom
hy : Decidable y.Dom
⊢ toWithTop x ≤ toWithTop y ↔ x ≤ y

tactic: induction x using PartENat.casesOn generalizing hx
state_before: case a
x : PartENat
hx : Decidable x.Dom
n✝ : ℕ
hy : Decidable (↑n✝).Dom
⊢ toWithTop x ≤ toWithTop ↑n✝ ↔ x ≤ ↑n✝

tactic: simp
state_before: case a
x : PartENat
hx : Decidable x.Dom
hy : Decidable ⊤.Dom
⊢ toWithTop x ≤ toWithTop ⊤ ↔ x ≤ ⊤

tactic: simp
state_before: case a.a
n✝ : ℕ
hy : Decidable (↑n✝).Dom
hx : Decidable ⊤.Dom
⊢ toWithTop ⊤ ≤ toWithTop ↑n✝ ↔ ⊤ ≤ ↑n✝

tactic: simp
state_before: case a.a
n✝¹ : ℕ
hy : Decidable (↑n✝¹).Dom
n✝ : ℕ
hx : Decidable (↑n✝).Dom
⊢ toWithTop ↑n✝ ≤ toWithTop ↑n✝¹ ↔ ↑n✝ ≤ ↑n✝¹
Theorem: TopologicalSpace.IsTopologicalBasis.nhds_basis_closure
File: Mathlib/Topology/Separation.lean

tactic: simpa only [and_comm] using hB.nhds_hasBasis.nhds_closure
state_before: α : Type u
β : Type v
inst✝¹ : TopologicalSpace α
inst✝ : RegularSpace α
a✝ : α
s : Set α
B : Set (Set α)
hB : IsTopologicalBasis B
a : α
⊢ HasBasis (𝓝 a) (fun s => a ∈ s ∧ s ∈ B) closure
Theorem: interior_eq_nhds'
File: Mathlib/Topology/Basic.lean

tactic: simp only [mem_interior, mem_nhds_iff, mem_setOf_eq]
state_before: α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
x : α
⊢ x ∈ interior s ↔ x ∈ {a | s ∈ 𝓝 a}
Theorem: Polynomial.le_rootMultiplicity_map
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: rw [le_rootMultiplicity_iff hmap]
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
A : Type u_1
B : Type u_2
inst✝¹ : CommRing A
inst✝ : CommRing B
p : A[X]
f : A →+* B
hmap : map f p ≠ 0
a : A
⊢ rootMultiplicity a p ≤ rootMultiplicity (↑f a) (map f p)

tactic: refine' _root_.trans _ ((mapRingHom f).map_dvd (pow_rootMultiplicity_dvd p a))
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
A : Type u_1
B : Type u_2
inst✝¹ : CommRing A
inst✝ : CommRing B
p : A[X]
f : A →+* B
hmap : map f p ≠ 0
a : A
⊢ (X - ↑C (↑f a)) ^ rootMultiplicity a p ∣ map f p

tactic: rw [map_pow, map_sub, coe_mapRingHom, map_X, map_C]
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
A : Type u_1
B : Type u_2
inst✝¹ : CommRing A
inst✝ : CommRing B
p : A[X]
f : A →+* B
hmap : map f p ≠ 0
a : A
⊢ (X - ↑C (↑f a)) ^ rootMultiplicity a p ∣ ↑(mapRingHom f) ((X - ↑C a) ^ rootMultiplicity a p)
Theorem: Even.pow_of_ne_zero
File: Mathlib/Algebra/Parity.lean

tactic: rw [pow_succ]
state_before: F : Type ?u.74464
α : Type u_1
β : Type ?u.74470
R : Type ?u.74473
inst✝¹ : Semiring α
inst✝ : Semiring β
m n : α
hm : Even m
a : ℕ
x✝ : a + 1 ≠ 0
⊢ Even (m ^ (a + 1))

tactic: exact hm.mul_right _
state_before: F : Type ?u.74464
α : Type u_1
β : Type ?u.74470
R : Type ?u.74473
inst✝¹ : Semiring α
inst✝ : Semiring β
m n : α
hm : Even m
a : ℕ
x✝ : a + 1 ≠ 0
⊢ Even (m * m ^ a)
Theorem: PiNat.firstDiff_lt_shortestPrefixDiff
File: Mathlib/Topology/MetricSpace/PiNat.lean

tactic: have A := exists_disjoint_cylinder hs hx
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
x y : (n : ℕ) → E n
hx : ¬x ∈ s
hy : y ∈ s
⊢ firstDiff x y < shortestPrefixDiff x s

tactic: rw [shortestPrefixDiff, dif_pos A]
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
x y : (n : ℕ) → E n
hx : ¬x ∈ s
hy : y ∈ s
A : ∃ n, Disjoint s (cylinder x n)
⊢ firstDiff x y < shortestPrefixDiff x s

tactic: have B := Nat.find_spec A
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
x y : (n : ℕ) → E n
hx : ¬x ∈ s
hy : y ∈ s
A : ∃ n, Disjoint s (cylinder x n)
⊢ firstDiff x y < Nat.find A

tactic: contrapose! B
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
x y : (n : ℕ) → E n
hx : ¬x ∈ s
hy : y ∈ s
A : ∃ n, Disjoint s (cylinder x n)
B : Disjoint s (cylinder x (Nat.find A))
⊢ firstDiff x y < Nat.find A

tactic: rw [not_lt] at B
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
x y : (n : ℕ) → E n
hx : ¬x ∈ s
hy : y ∈ s
A : ∃ n, Disjoint s (cylinder x n)
B : ¬firstDiff x y < Nat.find A
⊢ ¬Disjoint s (cylinder x (Nat.find A))

tactic: rw [not_disjoint_iff_nonempty_inter]
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
x y : (n : ℕ) → E n
hx : ¬x ∈ s
hy : y ∈ s
A : ∃ n, Disjoint s (cylinder x n)
B : Nat.find A ≤ firstDiff x y
⊢ ¬Disjoint s (cylinder x (Nat.find A))

tactic: refine' ⟨y, hy, _⟩
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
x y : (n : ℕ) → E n
hx : ¬x ∈ s
hy : y ∈ s
A : ∃ n, Disjoint s (cylinder x n)
B : Nat.find A ≤ firstDiff x y
⊢ Set.Nonempty (s ∩ cylinder x (Nat.find A))

tactic: rw [mem_cylinder_comm]
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
x y : (n : ℕ) → E n
hx : ¬x ∈ s
hy : y ∈ s
A : ∃ n, Disjoint s (cylinder x n)
B : Nat.find A ≤ firstDiff x y
⊢ y ∈ cylinder x (Nat.find A)

tactic: exact cylinder_anti y B (mem_cylinder_firstDiff x y)
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
s : Set ((n : ℕ) → E n)
hs : IsClosed s
x y : (n : ℕ) → E n
hx : ¬x ∈ s
hy : y ∈ s
A : ∃ n, Disjoint s (cylinder x n)
B : Nat.find A ≤ firstDiff x y
⊢ x ∈ cylinder y (Nat.find A)
Theorem: List.prod_append
File: Mathlib/Data/List/BigOperators/Basic.lean

tactic: simp [List.prod]
state_before: ι : Type ?u.5270
α : Type ?u.5273
M : Type u_1
N : Type ?u.5279
P : Type ?u.5282
M₀ : Type ?u.5285
G : Type ?u.5288
R : Type ?u.5291
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : Monoid P
l l₁ l₂ : List M
a : M
⊢ prod (l₁ ++ l₂) = foldl (fun x x_1 => x * x_1) (foldl (fun x x_1 => x * x_1) 1 l₁ * 1) l₂
Theorem: tsub_right_comm
File: Mathlib/Algebra/Order/Sub/Defs.lean

tactic: rw [←tsub_add_eq_tsub_tsub, tsub_add_eq_tsub_tsub_swap]
state_before: α : Type u_1
β : Type ?u.33907
inst✝³ : PartialOrder α
inst✝² : AddCommSemigroup α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
⊢ a - b - c = a - c - b
Theorem: CommRingCat.Colimits.cocone_naturality
File: Mathlib/Algebra/Category/Ring/Colimits.lean

tactic: ext
state_before: J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
j j' : J
f : j ⟶ j'
⊢ F.map f ≫ coconeMorphism F j' = coconeMorphism F j

tactic: apply Quot.sound
state_before: case w
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
j j' : J
f : j ⟶ j'
x✝ : (forget CommRingCat).obj (F.obj j)
⊢ (forget CommRingCat).map (F.map f ≫ coconeMorphism F j') x✝ = (forget CommRingCat).map (coconeMorphism F j) x✝

tactic: apply Relation.map
state_before: case w.a
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
j j' : J
f : j ⟶ j'
x✝ : (forget CommRingCat).obj (F.obj j)
⊢ Setoid.r (Prequotient.of j' (↑(F.map f) x✝)) (Prequotient.of j x✝)
Theorem: QuaternionAlgebra.Basis.k_mul_i
File: Mathlib/Algebra/QuaternionBasis.lean

tactic: rw [← i_mul_j, mul_assoc, j_mul_i, mul_neg, i_mul_k, neg_smul]
state_before: R : Type u_2
A : Type u_1
B : Type ?u.24590
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
c₁ c₂ : R
q : Basis A c₁ c₂
⊢ q.k * q.i = -c₁ • q.j
Theorem: Multiset.lcm_add
File: Mathlib/Algebra/GCDMonoid/Multiset.lean

tactic: simp [lcm]
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s₁ s₂ : Multiset α
⊢ lcm (s₁ + s₂) = fold GCDMonoid.lcm (GCDMonoid.lcm 1 1) (s₁ + s₂)
Theorem: IsSelfAdjoint.add
File: Mathlib/Algebra/Star/SelfAdjoint.lean

tactic: simp only [isSelfAdjoint_iff, star_add, hx.star_eq, hy.star_eq]
state_before: R : Type u_1
A : Type ?u.6762
inst✝¹ : AddMonoid R
inst✝ : StarAddMonoid R
x y : R
hx : IsSelfAdjoint x
hy : IsSelfAdjoint y
⊢ IsSelfAdjoint (x + y)
Theorem: Ioo_mem_nhdsWithin_Iio
File: Mathlib/Topology/Order/Basic.lean

tactic: simpa only [dual_Ioo] using
  Ioo_mem_nhdsWithin_Ioi (show toDual b ∈ Ico (toDual c) (toDual a) from H.symm)
state_before: α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderClosedTopology α
a✝ b✝ : α
inst✝ : TopologicalSpace γ
a b c : α
H : b ∈ Ioc a c
⊢ Ioo a c ∈ 𝓝[Iio b] b
Theorem: Bundle.TotalSpace.mk_cast
File: Mathlib/Data/Bundle.lean

tactic: subst h
state_before: B : Type u_1
E : B → Type u_2
x x' : B
h : x = x'
b : E x
⊢ totalSpaceMk x' (cast (_ : E x = E x') b) = totalSpaceMk x b

tactic: rfl
state_before: B : Type u_1
E : B → Type u_2
x : B
b : E x
⊢ totalSpaceMk x (cast (_ : E x = E x) b) = totalSpaceMk x b
Theorem: MvPowerSeries.coeff_monomial_ne
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: rw [monomial_def]
state_before: σ : Type u_1
R : Type u_2
inst✝ : Semiring R
m n : σ →₀ ℕ
h : m ≠ n
a : R
⊢ ↑(coeff R m) (↑(monomial R n) a) = 0

tactic: exact LinearMap.stdBasis_ne R (fun _ ↦ R) _ _ h a
state_before: σ : Type u_1
R : Type u_2
inst✝ : Semiring R
m n : σ →₀ ℕ
h : m ≠ n
a : R
⊢ ↑(coeff R m) (↑(LinearMap.stdBasis R (fun x => R) n) a) = 0
Theorem: Nat.dvd_right_iff_eq
File: Mathlib/Data/Nat/Order/Lemmas.lean

tactic: rw [h]
state_before: a b m✝ n✝¹ k m n✝ : ℕ
h : m = n✝
n : ℕ
⊢ m ∣ n ↔ n✝ ∣ n
Theorem: MeasureTheory.Conservative.measure_mem_forall_ge_image_not_mem_eq_zero
File: Mathlib/Dynamics/Ergodic/Conservative.lean

tactic: by_contra H
state_before: ι : Type ?u.62235
α : Type u_1
inst✝ : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Conservative f μ
hs : MeasurableSet s
n : ℕ
⊢ ↑↑μ {x | x ∈ s ∧ ∀ (m : ℕ), m ≥ n → ¬(f^[m]) x ∈ s} = 0

tactic: have : MeasurableSet (s ∩ { x | ∀ m ≥ n, (f^[m]) x ∉ s }) := by
  simp only [setOf_forall, ← compl_setOf]
  exact
    hs.inter (MeasurableSet.biInter (to_countable _) fun m _ => hf.measurable.iterate m hs.compl)
state_before: ι : Type ?u.62235
α : Type u_1
inst✝ : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Conservative f μ
hs : MeasurableSet s
n : ℕ
H : ¬↑↑μ {x | x ∈ s ∧ ∀ (m : ℕ), m ≥ n → ¬(f^[m]) x ∈ s} = 0
⊢ False

tactic: rcases(hf.exists_gt_measure_inter_ne_zero this H) n with ⟨m, hmn, hm⟩
state_before: ι : Type ?u.62235
α : Type u_1
inst✝ : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Conservative f μ
hs : MeasurableSet s
n : ℕ
H : ¬↑↑μ {x | x ∈ s ∧ ∀ (m : ℕ), m ≥ n → ¬(f^[m]) x ∈ s} = 0
this : MeasurableSet (s ∩ {x | ∀ (m : ℕ), m ≥ n → ¬(f^[m]) x ∈ s})
⊢ False

tactic: rcases nonempty_of_measure_ne_zero hm with ⟨x, ⟨_, hxn⟩, hxm, -⟩
state_before: case intro.intro
ι : Type ?u.62235
α : Type u_1
inst✝ : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Conservative f μ
hs : MeasurableSet s
n : ℕ
H : ¬↑↑μ {x | x ∈ s ∧ ∀ (m : ℕ), m ≥ n → ¬(f^[m]) x ∈ s} = 0
this : MeasurableSet (s ∩ {x | ∀ (m : ℕ), m ≥ n → ¬(f^[m]) x ∈ s})
m : ℕ
hmn : m > n
hm : ↑↑μ (s ∩ {x | ∀ (m : ℕ), m ≥ n → ¬(f^[m]) x ∈ s} ∩ f^[m] ⁻¹' (s ∩ {x | ∀ (m : ℕ), m ≥ n → ¬(f^[m]) x ∈ s})) ≠ 0
⊢ False

tactic: exact hxn m hmn.lt.le hxm
state_before: case intro.intro.intro.intro.intro.intro
ι : Type ?u.62235
α : Type u_1
inst✝ : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Conservative f μ
hs : MeasurableSet s
n : ℕ
H : ¬↑↑μ {x | x ∈ s ∧ ∀ (m : ℕ), m ≥ n → ¬(f^[m]) x ∈ s} = 0
this : MeasurableSet (s ∩ {x | ∀ (m : ℕ), m ≥ n → ¬(f^[m]) x ∈ s})
m : ℕ
hmn : m > n
hm : ↑↑μ (s ∩ {x | ∀ (m : ℕ), m ≥ n → ¬(f^[m]) x ∈ s} ∩ f^[m] ⁻¹' (s ∩ {x | ∀ (m : ℕ), m ≥ n → ¬(f^[m]) x ∈ s})) ≠ 0
x : α
left✝ : x ∈ s
hxn : x ∈ {x | ∀ (m : ℕ), m ≥ n → ¬(f^[m]) x ∈ s}
hxm : (f^[m]) x ∈ s
⊢ False

tactic: simp only [setOf_forall, ← compl_setOf]
state_before: ι : Type ?u.62235
α : Type u_1
inst✝ : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Conservative f μ
hs : MeasurableSet s
n : ℕ
H : ¬↑↑μ {x | x ∈ s ∧ ∀ (m : ℕ), m ≥ n → ¬(f^[m]) x ∈ s} = 0
⊢ MeasurableSet (s ∩ {x | ∀ (m : ℕ), m ≥ n → ¬(f^[m]) x ∈ s})

tactic: exact
  hs.inter (MeasurableSet.biInter (to_countable _) fun m _ => hf.measurable.iterate m hs.compl)
state_before: ι : Type ?u.62235
α : Type u_1
inst✝ : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Conservative f μ
hs : MeasurableSet s
n : ℕ
H : ¬↑↑μ {x | x ∈ s ∧ ∀ (m : ℕ), m ≥ n → ¬(f^[m]) x ∈ s} = 0
⊢ MeasurableSet (s ∩ ⋂ (i : ℕ) (_ : i ≥ n), {a | (f^[i]) a ∈ s}ᶜ)
Theorem: Nat.digits_lt_base'
File: Mathlib/Data/Nat/Digits.lean

tactic: apply Nat.strongInductionOn m
state_before: n b m : ℕ
⊢ ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2

tactic: intro n IH d hd
state_before: n b m : ℕ
⊢ ∀ (n : ℕ),
    (∀ (m : ℕ), m < n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2) → ∀ {d : ℕ}, d ∈ digits (b + 2) n → d < b + 2

tactic: cases' n with n
state_before: n✝ b m n : ℕ
IH : ∀ (m : ℕ), m < n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2
d : ℕ
hd : d ∈ digits (b + 2) n
⊢ d < b + 2

tactic: rw [digits_add_two_add_one] at hd
state_before: case succ
n✝ b m d n : ℕ
IH : ∀ (m : ℕ), m < succ n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2
hd : d ∈ digits (b + 2) (succ n)
⊢ d < b + 2

tactic: cases hd
state_before: case succ
n✝ b m d n : ℕ
IH : ∀ (m : ℕ), m < succ n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2
hd : d ∈ (n + 1) % (b + 2) :: digits (b + 2) ((n + 1) / (b + 2))
⊢ d < b + 2

tactic: rw [digits_zero] at hd
state_before: case zero
n b m d : ℕ
IH : ∀ (m : ℕ), m < zero → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2
hd : d ∈ digits (b + 2) zero
⊢ d < b + 2

tactic: cases hd
state_before: case zero
n b m d : ℕ
IH : ∀ (m : ℕ), m < zero → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2
hd : d ∈ []
⊢ d < b + 2

tactic: exact n.succ.mod_lt (by simp)
state_before: case succ.head
n✝ b m n : ℕ
IH : ∀ (m : ℕ), m < succ n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2
⊢ (n + 1) % (b + 2) < b + 2

tactic: simp
state_before: n✝ b m n : ℕ
IH : ∀ (m : ℕ), m < succ n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2
⊢ b + 2 > 0

tactic: apply IH ((n + 1) / (b + 2))
state_before: case succ.tail
n✝ b m d n : ℕ
IH : ∀ (m : ℕ), m < succ n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2
a✝ : List.Mem d (digits (b + 2) ((n + 1) / (b + 2)))
⊢ d < b + 2

tactic: . apply Nat.div_lt_self <;> simp
state_before: case succ.tail.a
n✝ b m d n : ℕ
IH : ∀ (m : ℕ), m < succ n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2
a✝ : List.Mem d (digits (b + 2) ((n + 1) / (b + 2)))
⊢ (n + 1) / (b + 2) < succ n

case succ.tail.a
n✝ b m d n : ℕ
IH : ∀ (m : ℕ), m < succ n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2
a✝ : List.Mem d (digits (b + 2) ((n + 1) / (b + 2)))
⊢ d ∈ digits (b + 2) ((n + 1) / (b + 2))

tactic: . assumption
state_before: case succ.tail.a
n✝ b m d n : ℕ
IH : ∀ (m : ℕ), m < succ n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2
a✝ : List.Mem d (digits (b + 2) ((n + 1) / (b + 2)))
⊢ d ∈ digits (b + 2) ((n + 1) / (b + 2))

tactic: apply Nat.div_lt_self <;> simp
state_before: case succ.tail.a
n✝ b m d n : ℕ
IH : ∀ (m : ℕ), m < succ n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2
a✝ : List.Mem d (digits (b + 2) ((n + 1) / (b + 2)))
⊢ (n + 1) / (b + 2) < succ n

tactic: assumption
state_before: case succ.tail.a
n✝ b m d n : ℕ
IH : ∀ (m : ℕ), m < succ n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2
a✝ : List.Mem d (digits (b + 2) ((n + 1) / (b + 2)))
⊢ d ∈ digits (b + 2) ((n + 1) / (b + 2))
Theorem: CategoryTheory.Abelian.FunctorCategory.coimageImageComparison_app'
File: Mathlib/CategoryTheory/Abelian/FunctorCategory.lean

tactic: simp only [coimageImageComparison_app, Iso.hom_inv_id_assoc, Iso.hom_inv_id, Category.assoc,
  Category.comp_id]
state_before: C : Type u
inst✝² : Category C
D : Type w
inst✝¹ : Category D
inst✝ : Abelian D
F G : C ⥤ D
α : F ⟶ G
X : C
⊢ (coimageImageComparison α).app X = (coimageObjIso α X).hom ≫ coimageImageComparison (α.app X) ≫ (imageObjIso α X).inv
Theorem: Real.sin_pi_div_sixteen
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

tactic: trans sin (π / 2 ^ 4)
state_before: x : ℝ
⊢ sin (π / 16) = sqrt (2 - sqrt (2 + sqrt 2)) / 2

tactic: congr
state_before: x : ℝ
⊢ sin (π / 16) = sin (π / 2 ^ 4)

x : ℝ
⊢ sin (π / 2 ^ 4) = sqrt (2 - sqrt (2 + sqrt 2)) / 2

tactic: norm_num
state_before: case e_x.e_a
x : ℝ
⊢ 16 = 2 ^ 4

x : ℝ
⊢ sin (π / 2 ^ 4) = sqrt (2 - sqrt (2 + sqrt 2)) / 2

tactic: simp
state_before: x : ℝ
⊢ sin (π / 2 ^ 4) = sqrt (2 - sqrt (2 + sqrt 2)) / 2
Theorem: PGame.neg_le_iff
File: Mathlib/SetTheory/Game/PGame.lean

tactic: rw [← neg_neg x, neg_le_neg_iff, neg_neg]
state_before: x y : PGame
⊢ -y ≤ x ↔ -x ≤ y
Theorem: Nat.mod_lt
File: src/lean/Init/Data/Nat/Div.lean

tactic: induction x, y using mod.inductionOn with
| base x y h₁ =>
  intro h₂
  have h₁ : ¬ 0 < y ∨ ¬ y ≤ x := Iff.mp (Decidable.not_and_iff_or_not _ _) h₁
  match h₁ with
  | Or.inl h₁ => exact absurd h₂ h₁
  | Or.inr h₁ =>
    have hgt : y > x := gt_of_not_le h₁
    have heq : x % y = x := mod_eq_of_lt hgt
    rw [← heq] at hgt
    exact hgt
| ind x y h h₂ =>
  intro h₃
  have ⟨_, h₁⟩ := h
  rw [mod_eq_sub_mod h₁]
  exact h₂ h₃
state_before: x y : Nat
⊢ y > 0 → x % y < y

tactic: intro h₂
state_before: case base
x y : Nat
h₁ : ¬(0 < y ∧ y ≤ x)
⊢ y > 0 → x % y < y

tactic: have h₁ : ¬ 0 < y ∨ ¬ y ≤ x := Iff.mp (Decidable.not_and_iff_or_not _ _) h₁
state_before: case base
x y : Nat
h₁ : ¬(0 < y ∧ y ≤ x)
h₂ : y > 0
⊢ x % y < y

tactic: match h₁ with
| Or.inl h₁ => exact absurd h₂ h₁
| Or.inr h₁ =>
  have hgt : y > x := gt_of_not_le h₁
  have heq : x % y = x := mod_eq_of_lt hgt
  rw [← heq] at hgt
  exact hgt
state_before: case base
x y : Nat
h₁✝ : ¬(0 < y ∧ y ≤ x)
h₂ : y > 0
h₁ : ¬0 < y ∨ ¬y ≤ x
⊢ x % y < y

tactic: exact absurd h₂ h₁
state_before: x y : Nat
h₁✝¹ : ¬(0 < y ∧ y ≤ x)
h₂ : y > 0
h₁✝ : ¬0 < y ∨ ¬y ≤ x
h₁ : ¬0 < y
⊢ x % y < y

tactic: have hgt : y > x := gt_of_not_le h₁
state_before: x y : Nat
h₁✝¹ : ¬(0 < y ∧ y ≤ x)
h₂ : y > 0
h₁✝ : ¬0 < y ∨ ¬y ≤ x
h₁ : ¬y ≤ x
⊢ x % y < y

tactic: have heq : x % y = x := mod_eq_of_lt hgt
state_before: x y : Nat
h₁✝¹ : ¬(0 < y ∧ y ≤ x)
h₂ : y > 0
h₁✝ : ¬0 < y ∨ ¬y ≤ x
h₁ : ¬y ≤ x
hgt : y > x
⊢ x % y < y

tactic: rw [← heq] at hgt
state_before: x y : Nat
h₁✝¹ : ¬(0 < y ∧ y ≤ x)
h₂ : y > 0
h₁✝ : ¬0 < y ∨ ¬y ≤ x
h₁ : ¬y ≤ x
hgt : y > x
heq : x % y = x
⊢ x % y < y

tactic: exact hgt
state_before: x y : Nat
h₁✝¹ : ¬(0 < y ∧ y ≤ x)
h₂ : y > 0
h₁✝ : ¬0 < y ∨ ¬y ≤ x
h₁ : ¬y ≤ x
hgt : y > x % y
heq : x % y = x
⊢ x % y < y

tactic: intro h₃
state_before: case ind
x y : Nat
h : 0 < y ∧ y ≤ x
h₂ : y > 0 → (x - y) % y < y
⊢ y > 0 → x % y < y

tactic: have ⟨_, h₁⟩ := h
state_before: case ind
x y : Nat
h : 0 < y ∧ y ≤ x
h₂ : y > 0 → (x - y) % y < y
h₃ : y > 0
⊢ x % y < y

tactic: rw [mod_eq_sub_mod h₁]
state_before: case ind
x y : Nat
h : 0 < y ∧ y ≤ x
h₂ : y > 0 → (x - y) % y < y
h₃ : y > 0
left✝ : 0 < y
h₁ : y ≤ x
⊢ x % y < y

tactic: exact h₂ h₃
state_before: case ind
x y : Nat
h : 0 < y ∧ y ≤ x
h₂ : y > 0 → (x - y) % y < y
h₃ : y > 0
left✝ : 0 < y
h₁ : y ≤ x
⊢ (x - y) % y < y