Skip to content

Commit 5fabfb6

Browse files
Merge main into nightly-testing
2 parents 9ce3954 + 107a51d commit 5fabfb6

25 files changed

Lines changed: 318 additions & 320 deletions

File tree

Cslib/Computability/Languages/ExampleEventuallyZero.lean

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,22 @@ namespace Cslib.ωLanguage.Example
2626

2727
open scoped LTS NA
2828

29-
/-- A sequence `xs` is in `eventually_zero` iff `xs k = 0` for all large `k`. -/
29+
/-- A sequence `xs` is in `eventuallyZero` iff `xs k = 0` for all large `k`. -/
3030
@[scoped grind =]
31-
def eventually_zero : ωLanguage (Fin 2) :=
31+
def eventuallyZero : ωLanguage (Fin 2) :=
3232
{ xs : ωSequence (Fin 2) | ∀ᶠ k in atTop, xs k = 0 }
3333

34-
/-- `eventually_zero` is accepted by a 2-state nondeterministic Buchi automaton. -/
34+
/-- `eventuallyZero` is accepted by a 2-state nondeterministic Buchi automaton. -/
3535
@[scoped grind =]
36-
def eventually_zero_na : NA.Buchi (Fin 2) (Fin 2) where
36+
def eventuallyZeroNa : NA.Buchi (Fin 2) (Fin 2) where
3737
-- Once state 1 is reached, only symbol 0 is accepted and the next state is still 1
3838
Tr s x s' := s = 1 → x = 0 ∧ s' = 1
3939
start := {0}
4040
accept := {1}
4141

42-
theorem eventually_zero_accepted_by_na_buchi :
43-
language eventually_zero_na = eventually_zero := by
44-
ext xs; unfold eventually_zero_na; constructor
42+
theorem eventuallyZero_accepted_by_na_buchi :
43+
language eventuallyZeroNa = eventuallyZero := by
44+
ext xs; unfold eventuallyZeroNa; constructor
4545
· rintro ⟨ss, h_run, h_acc⟩
4646
obtain ⟨m, h_m⟩ := Frequently.exists h_acc
4747
apply eventually_atTop.mpr
@@ -61,27 +61,27 @@ theorem eventually_zero_accepted_by_na_buchi :
6161
grind
6262

6363
private lemma extend_by_zero (u : List (Fin 2)) :
64-
u ++ω const 0eventually_zero := by
64+
u ++ω const 0eventuallyZero := by
6565
apply eventually_atTop.mpr
6666
use u.length
6767
grind [get_append_right']
6868

6969
private lemma extend_by_one (u : List (Fin 2)) :
70-
∃ v, 1 ∈ v ∧ u ++ v ++ω const 0eventually_zero := by
70+
∃ v, 1 ∈ v ∧ u ++ v ++ω const 0eventuallyZero := by
7171
use [1]
7272
grind [extend_by_zero]
7373

74-
private lemma extend_by_hyp {l : Language (Fin 2)} (h : l↗ω = eventually_zero)
74+
private lemma extend_by_hyp {l : Language (Fin 2)} (h : l↗ω = eventuallyZero)
7575
(u : List (Fin 2)) : ∃ v, 1 ∈ v ∧ u ++ v ∈ l := by
7676
obtain ⟨v, _, h_pfx⟩ := extend_by_one u
7777
rw [← h] at h_pfx
7878
have := frequently_atTop.mp h_pfx (u ++ v).length
7979
grind [extract_append_zero_right]
8080

81-
private noncomputable def oneSegs {l : Language (Fin 2)} (h : l↗ω = eventually_zero) (n : ℕ) :=
81+
private noncomputable def oneSegs {l : Language (Fin 2)} (h : l↗ω = eventuallyZero) (n : ℕ) :=
8282
Classical.choose <| extend_by_hyp h (List.ofFn (fun k : Fin n ↦ oneSegs h k)).flatten
8383

84-
private lemma oneSegs_lemma {l : Language (Fin 2)} (h : l↗ω = eventually_zero) (n : ℕ) :
84+
private lemma oneSegs_lemma {l : Language (Fin 2)} (h : l↗ω = eventuallyZero) (n : ℕ) :
8585
1 ∈ oneSegs h n ∧ (List.ofFn (fun k : Fin (n + 1) ↦ oneSegs h k)).flatten ∈ l := by
8686
let P u v := 1 ∈ v ∧ u ++ v ∈ l
8787
have : P ((List.ofFn (fun k : Fin n ↦ oneSegs h k)).flatten) (oneSegs h n) := by
@@ -92,13 +92,13 @@ private lemma oneSegs_lemma {l : Language (Fin 2)} (h : l↗ω = eventually_zero
9292
rw [List.ofFn_succ_last]
9393
simpa
9494

95-
theorem eventually_zero_not_omegaLim :
96-
¬ ∃ l : Language (Fin 2), l↗ω = eventually_zero := by
95+
theorem eventuallyZero_not_omegaLim :
96+
¬ ∃ l : Language (Fin 2), l↗ω = eventuallyZero := by
9797
rintro ⟨l, h⟩
9898
let ls := ωSequence.mk (oneSegs h)
9999
have h_segs := oneSegs_lemma h
100100
have h_pos : ∀ k, (ls k).length > 0 := by grind
101-
have h_ev : ls.flatten ∈ eventually_zero := by
101+
have h_ev : ls.flatten ∈ eventuallyZero := by
102102
rw [← h, mem_omegaLim, frequently_iff_strictMono]
103103
use (fun k ↦ ls.cumLen (k + 1))
104104
constructor

Cslib/Computability/Languages/OmegaRegularLanguage.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ where the automaton is not even required to be finite-state. -/
6161
theorem IsRegular.not_da_buchi :
6262
∃ (Symbol : Type) (p : ωLanguage Symbol), p.IsRegular ∧
6363
¬ ∃ (State : Type) (da : DA.Buchi State Symbol), language da = p := by
64-
refine ⟨Fin 2, Example.eventually_zero, ?_, ?_⟩
65-
· use Fin 2, inferInstance, Example.eventually_zero_na,
66-
Example.eventually_zero_accepted_by_na_buchi
64+
refine ⟨Fin 2, Example.eventuallyZero, ?_, ?_⟩
65+
· use Fin 2, inferInstance, Example.eventuallyZeroNa,
66+
Example.eventuallyZero_accepted_by_na_buchi
6767
· rintro ⟨State, ⟨da, acc⟩, _⟩
68-
have := Example.eventually_zero_not_omegaLim
68+
have := Example.eventuallyZero_not_omegaLim
6969
grind [DA.buchi_eq_finAcc_omegaLim]
7070

7171
/-- The ω-limit of a regular language is ω-regular. -/

Cslib/Computability/Machines/SingleTapeTuring/Basic.lean

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -160,27 +160,27 @@ def haltCfg (tm : SingleTapeTM Symbol) (s : List Symbol) : tm.Cfg := ⟨none, Bi
160160
/--
161161
The space used by a configuration is the space used by its tape.
162162
-/
163-
def Cfg.space_used (tm : SingleTapeTM Symbol) (cfg : tm.Cfg) : ℕ := cfg.BiTape.space_used
163+
def Cfg.spaceUsed (tm : SingleTapeTM Symbol) (cfg : tm.Cfg) : ℕ := cfg.BiTape.spaceUsed
164164

165165
@[scoped grind =]
166-
lemma Cfg.space_used_initCfg (tm : SingleTapeTM Symbol) (s : List Symbol) :
167-
(tm.initCfg s).space_used = max 1 s.length := BiTape.space_used_mk₁ s
166+
lemma Cfg.spaceUsed_initCfg (tm : SingleTapeTM Symbol) (s : List Symbol) :
167+
(tm.initCfg s).spaceUsed = max 1 s.length := BiTape.spaceUsed_mk₁ s
168168

169169
@[scoped grind =]
170-
lemma Cfg.space_used_haltCfg (tm : SingleTapeTM Symbol) (s : List Symbol) :
171-
(tm.haltCfg s).space_used = max 1 s.length := BiTape.space_used_mk₁ s
170+
lemma Cfg.spaceUsed_haltCfg (tm : SingleTapeTM Symbol) (s : List Symbol) :
171+
(tm.haltCfg s).spaceUsed = max 1 s.length := BiTape.spaceUsed_mk₁ s
172172

173-
lemma Cfg.space_used_step {tm : SingleTapeTM Symbol} (cfg cfg' : tm.Cfg)
174-
(hstep : tm.step cfg = some cfg') : cfg'.space_used ≤ cfg.space_used + 1 := by
173+
lemma Cfg.spaceUsed_step {tm : SingleTapeTM Symbol} (cfg cfg' : tm.Cfg)
174+
(hstep : tm.step cfg = some cfg') : cfg'.spaceUsed ≤ cfg.spaceUsed + 1 := by
175175
obtain ⟨_ | q, tape⟩ := cfg
176176
· simp [step] at hstep
177177
· simp only [step] at hstep
178178
generalize hM : tm.tr q tape.head = result at hstep
179179
obtain ⟨⟨wr, dir⟩, q''⟩ := result
180180
cases hstep; cases dir with
181-
| none => simp [Cfg.space_used, BiTape.optionMove, BiTape.space_used_write, hM]
182-
| some d => simpa [Cfg.space_used, BiTape.optionMove, BiTape.space_used_write, hM] using
183-
BiTape.space_used_move (tape.write wr) d
181+
| none => simp [Cfg.spaceUsed, BiTape.optionMove, BiTape.spaceUsed_write, hM]
182+
| some d => simpa [Cfg.spaceUsed, BiTape.optionMove, BiTape.spaceUsed_write, hM] using
183+
BiTape.spaceUsed_move (tape.write wr) d
184184

185185
end Cfg
186186

@@ -215,8 +215,8 @@ lemma output_length_le_input_length_add_time (tm : SingleTapeTM Symbol) (l l' :
215215
(h : tm.OutputsWithinTime l l' t) :
216216
l'.length ≤ max 1 l.length + t := by
217217
obtain ⟨steps, hsteps_le, hevals⟩ := h
218-
grind [hevals.apply_le_apply_add (Cfg.space_used tm)
219-
fun a b hstep ↦ Cfg.space_used_step a b (Option.mem_def.mp hstep)]
218+
grind [hevals.apply_le_apply_add (Cfg.spaceUsed tm)
219+
fun a b hstep ↦ Cfg.spaceUsed_step a b (Option.mem_def.mp hstep)]
220220

221221
section Computers
222222

@@ -392,15 +392,15 @@ structure TimeComputable (f : List Symbol → List Symbol) where
392392
/-- the underlying bundled SingleTapeTM -/
393393
tm : SingleTapeTM Symbol
394394
/-- a bound on runtime -/
395-
time_bound : ℕ → ℕ
396-
/-- proof this machine outputs `f` in at most `time_bound(input.length)` steps -/
397-
outputsFunInTime (a) : tm.OutputsWithinTime a (f a) (time_bound a.length)
395+
timeBound : ℕ → ℕ
396+
/-- proof this machine outputs `f` in at most `timeBound(input.length)` steps -/
397+
outputsFunInTime (a) : tm.OutputsWithinTime a (f a) (timeBound a.length)
398398

399399

400400
/-- The identity map on Symbol is computable in constant time. -/
401401
def TimeComputable.id : TimeComputable (Symbol := Symbol) id where
402402
tm := idComputer
403-
time_bound _ := 1
403+
timeBound _ := 1
404404
outputsFunInTime _ := ⟨1, le_rfl, RelatesInSteps.single rfl⟩
405405

406406
/--
@@ -419,36 +419,36 @@ then the time bound for the second machine still holds for that shorter input to
419419
-/
420420
def TimeComputable.comp {f g : List Symbol → List Symbol}
421421
(hf : TimeComputable f) (hg : TimeComputable g)
422-
(h_mono : Monotone hg.time_bound) :
422+
(h_mono : Monotone hg.timeBound) :
423423
(TimeComputable (g ∘ f)) where
424424
tm := compComputer hf.tm hg.tm
425425
-- perhaps it would be good to track the blow up separately?
426-
time_bound l := (hf.time_bound l) + hg.time_bound (max 1 l + hf.time_bound l)
426+
timeBound l := (hf.timeBound l) + hg.timeBound (max 1 l + hf.timeBound l)
427427
outputsFunInTime a := by
428428
have hf_outputsFun := hf.outputsFunInTime a
429429
have hg_outputsFun := hg.outputsFunInTime (f a)
430430
simp only [OutputsWithinTime, initCfg, compComputer_q₀_eq, Function.comp_apply,
431431
haltCfg] at hg_outputsFun hf_outputsFun ⊢
432-
-- The computer reduces a to f a in time hf.time_bound a.length
432+
-- The computer reduces a to f a in time hf.timeBound a.length
433433
have h_a_reducesTo_f_a :
434434
RelatesWithinSteps (compComputer hf.tm hg.tm).TransitionRelation
435435
(initialCfg hf.tm hg.tm a)
436436
(intermediateCfg hf.tm hg.tm (f a))
437-
(hf.time_bound a.length) :=
437+
(hf.timeBound a.length) :=
438438
comp_left_relatesWithinSteps hf.tm hg.tm a (f a)
439-
(hf.time_bound a.length) hf_outputsFun
440-
-- The computer reduces f a to g (f a) in time hg.time_bound (f a).length
439+
(hf.timeBound a.length) hf_outputsFun
440+
-- The computer reduces f a to g (f a) in time hg.timeBound (f a).length
441441
have h_f_a_reducesTo_g_f_a :
442442
RelatesWithinSteps (compComputer hf.tm hg.tm).TransitionRelation
443443
(intermediateCfg hf.tm hg.tm (f a))
444444
(finalCfg hf.tm hg.tm (g (f a)))
445-
(hg.time_bound (f a).length) :=
445+
(hg.timeBound (f a).length) :=
446446
comp_right_relatesWithinSteps hf.tm hg.tm (f a) (g (f a))
447-
(hg.time_bound (f a).length) hg_outputsFun
447+
(hg.timeBound (f a).length) hg_outputsFun
448448
-- Therefore, the computer reduces a to g (f a) in the sum of those times.
449449
have h_a_reducesTo_g_f_a := RelatesWithinSteps.trans h_a_reducesTo_f_a h_f_a_reducesTo_g_f_a
450450
apply RelatesWithinSteps.of_le h_a_reducesTo_g_f_a
451-
refine Nat.add_le_add_left ?_ (hf.time_bound a.length)
451+
refine Nat.add_le_add_left ?_ (hf.timeBound a.length)
452452
· apply h_mono
453453
-- Use the lemma about output length being bounded by input length + time
454454
exact output_length_le_input_length_add_time hf.tm _ _ _ (hf.outputsFunInTime a)
@@ -478,7 +478,7 @@ structure PolyTimeComputable (f : List Symbol → List Symbol) extends TimeCompu
478478
/-- a polynomial time bound -/
479479
poly : Polynomial ℕ
480480
/-- proof that this machine outputs `f` in at most `time(input.length)` steps -/
481-
bounds : ∀ n, time_bound n ≤ poly.eval n
481+
bounds : ∀ n, timeBound n ≤ poly.eval n
482482

483483
/-- A proof that the identity map on Symbol is computable in polytime. -/
484484
noncomputable def PolyTimeComputable.id : PolyTimeComputable (Symbol := Symbol) id where
@@ -493,7 +493,7 @@ A proof that the composition of two polytime computable functions is polytime co
493493
-/
494494
noncomputable def PolyTimeComputable.comp {f g : List Symbol → List Symbol}
495495
(hf : PolyTimeComputable f) (hg : PolyTimeComputable g)
496-
(h_mono : Monotone hg.time_bound) :
496+
(h_mono : Monotone hg.timeBound) :
497497
PolyTimeComputable (g ∘ f) where
498498
toTimeComputable := TimeComputable.comp hf.toTimeComputable hg.toTimeComputable h_mono
499499
poly := hf.poly + hg.poly.comp (1 + X + hf.poly)

Cslib/Computability/URM/StraightLine.lean

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ they always halt exactly at their length.
2020
## Main results
2121
2222
- `straight_line_halts`: straight-line programs always halt
23-
- `straightLine_finalState`: final state after running a straight-line program
23+
- `straightLinefinalState`: final state after running a straight-line program
2424
-/
2525

2626
@[expose] public section
@@ -100,27 +100,27 @@ theorem straight_line_halts {p : Program} (hsl : p.IsStraightLine) (inputs : Lis
100100

101101
/-- The halting state for a straight-line program starting from registers r.
102102
Wraps Classical.choose to hide it from the API. -/
103-
noncomputable def straightLine_finalState {p : Program}
103+
noncomputable def straightLinefinalState {p : Program}
104104
(hsl : p.IsStraightLine) (r : Regs) : State :=
105105
Classical.choose (straight_line_halts_from_regs hsl r)
106106

107-
/-- Specification: the state from straightLine_finalState satisfies Steps, isHalted,
107+
/-- Specification: the state from straightLinefinalState satisfies Steps, isHalted,
108108
and has pc = p.length. -/
109-
theorem straightLine_finalState_spec {p : Program} (hsl : p.IsStraightLine) (r : Regs) :
110-
let s := straightLine_finalState hsl r
109+
theorem straightLinefinalState_spec {p : Program} (hsl : p.IsStraightLine) (r : Regs) :
110+
let s := straightLinefinalState hsl r
111111
Steps p ⟨0, r⟩ s ∧ s.isHalted p ∧ s.pc = p.length :=
112112
Classical.choose_spec (straight_line_halts_from_regs hsl r)
113113

114114
/-- The final registers after running a straight-line program from given starting registers. -/
115-
noncomputable def straightLine_finalRegs {p : Program} (hsl : p.IsStraightLine) (r : Regs) : Regs :=
116-
(straightLine_finalState hsl r).regs
115+
noncomputable def straightLineFinalRegs {p : Program} (hsl : p.IsStraightLine) (r : Regs) : Regs :=
116+
(straightLinefinalState hsl r).regs
117117

118-
/-- For a straight-line program, s.regs equals straightLine_finalRegs if halted from r. -/
119-
theorem straightLine_finalRegs_eq_of_halted {p : Program} (hsl : p.IsStraightLine)
118+
/-- For a straight-line program, s.regs equals straightLineFinalRegs if halted from r. -/
119+
theorem straightLineFinalRegs_eq_of_halted {p : Program} (hsl : p.IsStraightLine)
120120
(r : Regs) (s : State) (hsteps : Steps p ⟨0, r⟩ s) (hhalted : s.isHalted p) :
121-
s.regs = straightLine_finalRegs hsl r :=
122-
Steps.eq_of_halts hsteps hhalted (straightLine_finalState_spec hsl r).1
123-
(straightLine_finalState_spec hsl r).2.1 ▸ rfl
121+
s.regs = straightLineFinalRegs hsl r :=
122+
Steps.eq_of_halts hsteps hhalted (straightLinefinalState_spec hsl r).1
123+
(straightLinefinalState_spec hsl r).2.1 ▸ rfl
124124

125125
/-- In a straight-line program, we can characterize the state at any intermediate pc.
126126
This gives us the state after executing instructions 0..pc-1. -/

Cslib/Foundations/Data/BiTape.lean

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ will not collide.
3333
* `BiTape`: A tape with a head symbol and left/right contents stored as `StackTape`
3434
* `BiTape.move`: Move the tape head left or right
3535
* `BiTape.write`: Write a symbol at the current head position
36-
* `BiTape.space_used`: The space used by the tape
36+
* `BiTape.spaceUsed`: The space used by the tape
3737
-/
3838

3939
@[expose] public section
@@ -76,28 +76,28 @@ with the head under the first element of the list if it exists.
7676
def mk₁ (l : List Symbol) : BiTape Symbol :=
7777
match l with
7878
| [] => ∅
79-
| h :: t => { head := some h, left := ∅, right := StackTape.map_some t }
79+
| h :: t => { head := some h, left := ∅, right := StackTape.mapSome t }
8080

8181
section Move
8282

8383
/--
8484
Move the head left by shifting the left StackTape under the head.
8585
-/
86-
def move_left (t : BiTape Symbol) : BiTape Symbol :=
86+
def moveLeft (t : BiTape Symbol) : BiTape Symbol :=
8787
⟨t.left.head, t.left.tail, StackTape.cons t.head t.right⟩
8888

8989
/--
9090
Move the head right by shifting the right StackTape under the head.
9191
-/
92-
def move_right (t : BiTape Symbol) : BiTape Symbol :=
92+
def moveRight (t : BiTape Symbol) : BiTape Symbol :=
9393
⟨t.right.head, StackTape.cons t.head t.left, t.right.tail⟩
9494

9595
/--
9696
Move the head to the left or right, shifting the tape underneath it.
9797
-/
9898
def move (t : BiTape Symbol) : Dir → BiTape Symbol
99-
| .left => t.move_left
100-
| .right => t.move_right
99+
| .left => t.moveLeft
100+
| .right => t.moveRight
101101

102102
/--
103103
Optionally perform a `move`, or do nothing if `none`.
@@ -107,12 +107,12 @@ def optionMove : BiTape Symbol → Option Dir → BiTape Symbol
107107
| t, some d => t.move d
108108

109109
@[simp]
110-
lemma move_left_move_right (t : BiTape Symbol) : t.move_left.move_right = t := by
111-
simp [move_right, move_left]
110+
lemma moveLeft_moveRight (t : BiTape Symbol) : t.moveLeft.moveRight = t := by
111+
simp [moveRight, moveLeft]
112112

113113
@[simp]
114-
lemma move_right_move_left (t : BiTape Symbol) : t.move_right.move_left = t := by
115-
simp [move_left, move_right]
114+
lemma moveRight_moveLeft (t : BiTape Symbol) : t.moveRight.moveLeft = t := by
115+
simp [moveLeft, moveRight]
116116

117117
end Move
118118

@@ -126,22 +126,22 @@ The space used by a `BiTape` is the number of symbols
126126
between and including the head, and leftmost and rightmost non-blank symbols on the `BiTape`.
127127
-/
128128
@[scoped grind]
129-
def space_used (t : BiTape Symbol) : ℕ := 1 + t.left.length + t.right.length
129+
def spaceUsed (t : BiTape Symbol) : ℕ := 1 + t.left.length + t.right.length
130130

131131
@[simp, grind =]
132-
lemma space_used_write (t : BiTape Symbol) (a : Option Symbol) :
133-
(t.write a).space_used = t.space_used := by rfl
132+
lemma spaceUsed_write (t : BiTape Symbol) (a : Option Symbol) :
133+
(t.write a).spaceUsed = t.spaceUsed := by rfl
134134

135-
lemma space_used_mk (l : List Symbol) :
136-
(mk₁ l).space_used = max 1 l.length := by
135+
lemma spaceUsed_mk (l : List Symbol) :
136+
(mk₁ l).spaceUsed = max 1 l.length := by
137137
cases l with
138-
| nil => simp [mk₁, space_used, nil, StackTape.length_nil]
139-
| cons h t => simp [mk₁, space_used, StackTape.length_nil, StackTape.length_map_some]; omega
138+
| nil => simp [mk₁, spaceUsed, nil, StackTape.length_nil]
139+
| cons h t => simp [mk₁, spaceUsed, StackTape.length_nil, StackTape.length_mapSome]; omega
140140

141-
lemma space_used_move (t : BiTape Symbol) (d : Dir) :
142-
(t.move d).space_used ≤ t.space_used + 1 := by
143-
cases d <;> grind [move_left, move_right, move,
144-
space_used, StackTape.length_tail_le, StackTape.length_cons_le]
141+
lemma spaceUsed_move (t : BiTape Symbol) (d : Dir) :
142+
(t.move d).spaceUsed ≤ t.spaceUsed + 1 := by
143+
cases d <;> grind [moveLeft, moveRight, move,
144+
spaceUsed, StackTape.length_tail_le, StackTape.length_cons_le]
145145

146146
end BiTape
147147

Cslib/Foundations/Data/HasFresh.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ instance HasFresh.to_infinite (α : Type u) [HasFresh α] : Infinite α := by
4444

4545
/-- All infinite types have an associated (at least noncomputable) fresh function.
4646
This, in conjunction with `HasFresh.to_infinite`, characterizes `HasFresh`. -/
47-
noncomputable instance HasFresh.of_infinite (α : Type u) [Infinite α] : HasFresh α where
47+
noncomputable instance (α : Type u) [Infinite α] : HasFresh α where
4848
fresh s := Infinite.exists_notMem_finset s |>.choose
4949
fresh_notMem s := by grind
5050

0 commit comments

Comments
 (0)