Skip to content

Commit b23a546

Browse files
committed
Refactor matrix functions P and I to use Fin s.card for dimensions
1 parent dba2a95 commit b23a546

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ProgramAnalysis/ProbabilisticPrograms/PWhile.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,10 +380,10 @@ def E (size : Nat) (row col : Fin size) : Matrix (Fin size) (Fin size) (Fin 2) :
380380
def U (s : Finset Nat) (f : s → s) : Matrix s s (Fin 2) :=
381381
fun i j => if f i = j then 1 else 0
382382

383-
def P (s : Finset Nat) (f : s → Bool) : Matrix s s (Fin 2) :=
383+
def P (s : Finset Nat) (f : Fin s.card → Bool) : Matrix (Fin s.card) (Fin s.card) (Fin 2) :=
384384
fun i j => if i = j ∧ f i then 1 else 0
385385

386-
def I (s : Finset Nat) : Matrix s s (Fin 2) :=
386+
def I (s : Finset Nat) : Matrix (Fin s.card) (Fin s.card) (Fin 2) :=
387387
fun i j => if i = j then 1 else 0
388388

389389
end ProgramAnalysis.ProbabilisticPrograms

0 commit comments

Comments
 (0)