Skip to content

Commit

Permalink
adding another example
Browse files Browse the repository at this point in the history
  • Loading branch information
GenericMonkey committed Jul 21, 2023
1 parent 6f297e2 commit fd89b1f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Cubical/Reflection/RecordEquiv/More.agda
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,21 @@ module _ where private

foo-iso : Iso Foo ({A} Baz A)
unquoteDef foo-iso = defineRecordIsoΣ foo-iso (quote Foo)

module _ where private
Bar : Type
Bar 0 = Unit
Bar _ =

record Foo {n : ℕ} (b : Bar n) : Type where
field
foo : {a : ℕ} Bar a
baz : Bar n
goo : b ≡ baz

Sigma : {n : ℕ} (b : Bar n) Type
Sigma {n} b = Σ ({a : ℕ} Bar a) (λ z Σ (Bar n) (PathP (λ i Bar n) b))

foo-iso : {x : ℕ} {b : Bar x} Iso (Foo b) (Sigma b)
unquoteDef foo-iso = defineRecordIsoΣ foo-iso (quote Foo)

0 comments on commit fd89b1f

Please sign in to comment.