Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix subshape definitions #85

Merged
merged 1 commit into from
Sep 19, 2023
Merged

Fix subshape definitions #85

merged 1 commit into from
Sep 19, 2023

Conversation

fizruk
Copy link
Member

@fizruk fizruk commented Sep 19, 2023

This fixes the following bug (missing tope checks):

#lang rzk-1

#define Δ²
  : (2 × 2) → TOPE
  := \ (t, s) → (s ≤ t)

#define Λ
  : Δ² → TOPE
  := \ (t, s) → (s ≡ 0₂) ∨ (t ≡ 1₂)

#define Λ-is-in-Δ²
  (A : U)
  : (Δ² → A) → (Λ → A)
  := \ f t → f t

#define wrong-Λ
  : Δ² → TOPE
  := \ (t, s) → t ≤ s

#define Λ-alt
  : (2 × 2) → TOPE
  := \ (t, s) → (t ≡ 0₂) ∨ (s ≡ 1₂)

#define Λ-alt-is-in-wrong-Λ
  (A : U)
  : (wrong-Λ → A) → (Λ-alt → A)   -- used to be fine before this PR
  -- : (( st : (2 × 2) | wrong-Λ st ) → A) → (Λ-alt → A) -- correctly issued a type error
  := \ f t → f t

@fizruk fizruk merged commit 53083c2 into develop Sep 19, 2023
2 checks passed
@fizruk fizruk deleted the fix-subshape-definitions branch September 19, 2023 14:02
@fizruk fizruk mentioned this pull request Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant