Skip to content

Commit

Permalink
Update Diverge/Elab.lean to use the more general FixII definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
sonmarcho committed Dec 11, 2023
1 parent cb332ff commit c23a376
Show file tree
Hide file tree
Showing 3 changed files with 387 additions and 195 deletions.
9 changes: 2 additions & 7 deletions backends/lean/Base/Diverge/Base.lean
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,6 @@ namespace FixI
kk_ty id a b → kk_ty id a b

abbrev in_out_ty : Type (imax (u + 1) (v + 1)) := (in_ty : Type u) × ((x:in_ty) → Type v)
-- TODO: remove?
abbrev mk_in_out_ty (in_ty : Type u) (out_ty : in_ty → Type v) :
in_out_ty :=
Sigma.mk in_ty out_ty
Expand Down Expand Up @@ -717,11 +716,8 @@ namespace FixI
end FixI

namespace FixII
/- Indexed fixed-point: definitions with indexed types, convenient to use for mutually
recursive definitions. We simply port the definitions and proofs from Fix to a more
specific case.
Here however, we group the types into a parameter distinct from the inputs.
/- Similar to FixI, but we split the input arguments between the type parameters
and the input values.
-/
open Primitives Fix

Expand Down Expand Up @@ -792,7 +788,6 @@ namespace FixII

abbrev in_out_ty : Type (imax (u + 1) (imax (v + 1) (w + 1))) :=
(ty : Type u) × (ty → Type v) × (ty → Type w)
-- TODO: remove?
abbrev mk_in_out_ty (ty : Type u) (in_ty : ty → Type v) (out_ty : ty → Type w) :
in_out_ty :=
Sigma.mk ty (Prod.mk in_ty out_ty)
Expand Down
Loading

0 comments on commit c23a376

Please sign in to comment.