lean4-htt/tests/lean/run/streamEqIssue.lean
Markus Himmel 5c707d936c
chore: rename Stream to Std.Stream (#10645)
This PR renames `Stream` to `Std.Stream` so that the name becomes
available to mathlib after a deprecation cycle.
2025-10-02 15:25:56 +00:00

9 lines
302 B
Text

@[simp] def Std.Stream.hasLength [Stream stream value] (n : Nat) (s : stream) : Bool :=
match n, Stream.next? s with
| 0, none => true
| n + 1, some (_, s') => hasLength n s'
| _, _ => false
#check @Std.Stream.hasLength.eq_1
#check @Std.Stream.hasLength.eq_2
#check @Std.Stream.hasLength.eq_3