Skip to content

Commit 8437cda

Browse files
committed
chore(Archive,Counterexamples): use Type* not Type _ (leanprover-community#7663)
This is an exhaustive replacement.
1 parent 0166642 commit 8437cda

File tree

14 files changed

+31
-31
lines changed

14 files changed

+31
-31
lines changed

Archive/Examples/PropEncodable.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ show encodability.
3030
namespace PropEncodable
3131

3232
/-- Propositional formulas with labels from `α`. -/
33-
inductive PropForm (α : Type _)
33+
inductive PropForm (α : Type*)
3434
| var : α → PropForm α
3535
| not : PropForm α → PropForm α
3636
| and : PropForm α → PropForm α → PropForm α
@@ -49,7 +49,7 @@ The next three functions make it easier to construct functions from a small
4949

5050
namespace PropForm
5151

52-
private def Constructors (α : Type _) :=
52+
private def Constructors (α : Type*) :=
5353
α ⊕ (Unit ⊕ (Unit ⊕ Unit))
5454

5555
local notation "cvar " a => Sum.inl a
@@ -61,13 +61,13 @@ local notation "cand" => Sum.inr (Sum.inr (Sum.inr Unit.unit))
6161
local notation "cor" => Sum.inr (Sum.inr (Sum.inl Unit.unit))
6262

6363
@[simp]
64-
private def arity (α : Type _) : Constructors α → Nat
64+
private def arity (α : Type*) : Constructors α → Nat
6565
| cvar _ => 0
6666
| cnot => 1
6767
| cand => 2
6868
| cor => 2
6969

70-
variable {α : Type _}
70+
variable {α : Type*}
7171

7272
instance : ∀ c : Unit ⊕ (Unit ⊕ Unit), NeZero (arity α (.inr c))
7373
| .inl () => ⟨one_ne_zero⟩

Archive/Imo/Imo1962Q4.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ We now present a second solution. The key to this solution is that, when the id
106106
converted to an identity which is polynomial in `a` := `cos x`, it can be rewritten as a product of
107107
terms, `a ^ 2 * (2 * a ^ 2 - 1) * (4 * a ^ 2 - 3)`, being equal to zero.
108108
-/
109-
theorem formula {R : Type _} [CommRing R] [IsDomain R] [CharZero R] (a : R) :
109+
theorem formula {R : Type*} [CommRing R] [IsDomain R] [CharZero R] (a : R) :
110110
a ^ 2 + ((2 : R) * a ^ 2 - (1 : R)) ^ 2 + ((4 : R) * a ^ 3 - 3 * a) ^ 2 = 1
111111
((2 : R) * a ^ 2 - (1 : R)) * ((4 : R) * a ^ 3 - 3 * a) = 0 := by
112112
constructor <;> intro h

Archive/Imo/Imo1987Q1.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ holds true for `n = 0` as well, so we first prove it, then deduce the original v
2525
`n ≥ 1`. -/
2626

2727

28-
variable (α : Type _) [Fintype α] [DecidableEq α]
28+
variable (α : Type*) [Fintype α] [DecidableEq α]
2929

3030
open scoped BigOperators Nat
3131

@@ -54,7 +54,7 @@ theorem card_fixed_points :
5454
Finset.filter_eq', Finset.card_univ]
5555
#align imo1987_q1.card_fixed_points Imo1987Q1.card_fixed_points
5656

57-
/-- Given `α : Type _` and `k : ℕ`, `fiber α k` is the set of permutations of `α` with exactly `k`
57+
/-- Given `α : Type*` and `k : ℕ`, `fiber α k` is the set of permutations of `α` with exactly `k`
5858
fixed points. -/
5959
def fiber (k : ℕ) : Set (Perm α) :=
6060
{σ : Perm α | card (fixedPoints σ) = k}
@@ -91,7 +91,7 @@ def fixedPointsEquiv' :
9191
right_inv := fun ⟨⟨x, σ⟩, h⟩ => rfl
9292
#align imo1987_q1.fixed_points_equiv' Imo1987Q1.fixedPointsEquiv'
9393

94-
/-- Main statement for any `(α : Type _) [Fintype α]`. -/
94+
/-- Main statement for any `(α : Type*) [Fintype α]`. -/
9595
theorem main_fintype : ∑ k in range (card α + 1), k * p α k = card α * (card α - 1)! := by
9696
have A : ∀ (k) (σ : fiber α k), card (fixedPoints (↑σ : Perm α)) = k := fun k σ => σ.2
9797
simpa [A, ← Fin.sum_univ_eq_sum_range, -card_ofFinset, Finset.card_univ, card_fixed_points,

Archive/Imo/Imo1998Q2.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@ set_option linter.uppercaseLean3 false
4545

4646
open scoped Classical
4747

48-
variable {C J : Type _} (r : C → J → Prop)
48+
variable {C J : Type*} (r : C → J → Prop)
4949

5050
namespace Imo1998Q2
5151

5252
noncomputable section
5353

5454
/-- An ordered pair of judges. -/
55-
abbrev JudgePair (J : Type _) :=
55+
abbrev JudgePair (J : Type*) :=
5656
J × J
5757
#align imo1998_q2.judge_pair Imo1998Q2.JudgePair
5858

5959
/-- A triple consisting of contestant together with an ordered pair of judges. -/
60-
abbrev AgreedTriple (C J : Type _) :=
60+
abbrev AgreedTriple (C J : Type*) :=
6161
C × JudgePair J
6262
#align imo1998_q2.agreed_triple Imo1998Q2.AgreedTriple
6363

@@ -168,7 +168,7 @@ theorem A_card_upper_bound {k : ℕ}
168168

169169
end
170170

171-
theorem add_sq_add_sq_sub {α : Type _} [Ring α] (x y : α) :
171+
theorem add_sq_add_sq_sub {α : Type*} [Ring α] (x y : α) :
172172
(x + y) * (x + y) + (x - y) * (x - y) = 2 * x * x + 2 * y * y := by noncomm_ring
173173
#align imo1998_q2.add_sq_add_sq_sub Imo1998Q2.add_sq_add_sq_sub
174174

Archive/Imo/Imo2019Q2.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ set_option linter.uppercaseLean3 false
6767

6868
attribute [local instance] FiniteDimensional.finiteDimensional_of_fact_finrank_eq_two
6969

70-
variable (V : Type _) (Pt : Type _)
70+
variable (V : Type*) (Pt : Type*)
7171

7272
variable [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace Pt]
7373

Archive/OxfordInvariants/Summer2021/Week3P1.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ natural.
7171

7272
open scoped BigOperators
7373

74-
variable {α : Type _} [LinearOrderedField α]
74+
variable {α : Type*} [LinearOrderedField α]
7575

7676
theorem OxfordInvariants.Week3P1 (n : ℕ) (a : ℕ → ℕ) (a_pos : ∀ i ≤ n, 0 < a i)
7777
(ha : ∀ i, i + 2 ≤ n → a (i + 1) ∣ a i + a (i + 2)) :

Archive/Wiedijk100Theorems/AbelRuffini.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ open scoped Polynomial
3939

4040
attribute [local instance] splits_ℚ_ℂ
4141

42-
variable (R : Type _) [CommRing R] (a b : ℕ)
42+
variable (R : Type*) [CommRing R] (a b : ℕ)
4343

4444
/-- A quintic polynomial that we will show is irreducible -/
4545
noncomputable def Φ : R[X] :=
@@ -49,7 +49,7 @@ noncomputable def Φ : R[X] :=
4949
variable {R}
5050

5151
@[simp]
52-
theorem map_Phi {S : Type _} [CommRing S] (f : R →+* S) : (Φ R a b).map f = Φ S a b := by simp [Φ]
52+
theorem map_Phi {S : Type*} [CommRing S] (f : R →+* S) : (Φ R a b).map f = Φ S a b := by simp [Φ]
5353
#align abel_ruffini.map_Phi AbelRuffini.map_Phi
5454

5555
@[simp]

Archive/Wiedijk100Theorems/AscendingDescendingSequences.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ sequences, increasing, decreasing, Ramsey, Erdos-Szekeres, Erdős–Szekeres, Er
2424
-/
2525

2626

27-
variable {α : Type _} [LinearOrder α] {β : Type _}
27+
variable {α : Type*} [LinearOrder α] {β : Type*}
2828

2929
open Function Finset
3030

Archive/Wiedijk100Theorems/BallotProblem.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ theorem first_vote_pos :
252252
· simp
253253
#align ballot.first_vote_pos Ballot.first_vote_pos
254254

255-
theorem headI_mem_of_nonempty {α : Type _} [Inhabited α] : ∀ {l : List α} (_ : l ≠ []), l.headI ∈ l
255+
theorem headI_mem_of_nonempty {α : Type*} [Inhabited α] : ∀ {l : List α} (_ : l ≠ []), l.headI ∈ l
256256
| [], h => (h rfl).elim
257257
| x::l, _ => List.mem_cons_self x l
258258
#align ballot.head_mem_of_nonempty Ballot.headI_mem_of_nonempty

Archive/Wiedijk100Theorems/HeronsFormula.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace Theorems100
3131

3232
local notation "√" => Real.sqrt
3333

34-
variable {V : Type _} {P : Type _} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P]
34+
variable {V : Type*} {P : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P]
3535
[NormedAddTorsor V P]
3636

3737
/-- **Heron's formula**: The area of a triangle with side lengths `a`, `b`, and `c` is

0 commit comments

Comments
 (0)