You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
open importAgda.Builtin.Natopen importAgda.Builtin.Equalitydata_≤_: Nat → Nat →Setwhere0≤x :∀ {x} →0 ≤ x
s≤s :∀ {x y} → x ≤ y → suc x ≤ suc y
instances≤s' :∀ {x y} → ⦃ x ≤ y ⦄ → suc x ≤ suc y
s≤s' ⦃ x ⦄ = s≤s x
x≤sucy :∀ {x y} ⦃ p : x ≤ y ⦄ → x ≤ suc y
x≤sucy {.0} {y} ⦃ 0≤x ⦄ = 0≤x
x≤sucy {.(suc _)} {.(suc _)} ⦃ s≤s p ⦄ = s≤s (x≤sucy ⦃ p ⦄)
{-# INCOHERENT x≤sucy #-}Positive : Nat →Set
Positive n =1 ≤ n
postulatez : (b : Nat) → .⦃ _ : Positive b ⦄ → Nat
foo : ∀ n → .⦃ _ : Positive n ⦄ → z n ≡ 0bar : ∀ n → ⦃ _ : Positive n ⦄ → z n ≡ 0
bar n@(suc _) ⦃ p ⦄ = foo n
{-p != s≤s _54 of type 1 ≤ suc n₁when checking that n is a valid argument to a function of type(n₂ : Nat) .⦃ _ = z₁ : Positive n₂ ⦄ → z n₂ ≡ 0-}
If the instance argument to foo is not marked irrelevant, then the error is
Failed to solve the following constraints:
Resolve instance argument _58 : Positive (suc n₁)
Candidates
s≤s' : {x y : Nat} ⦃ _ : x ≤ y ⦄ → suc x ≤ suc y
p : 1 ≤ suc n₁
(stuck)
I think it's trying to compare z n ⦃ p ⦄ with z n ⦃ s≤s' ⦄, which should succeed but fails (why?)
The text was updated successfully, but these errors were encountered:
Minimised from #427 (comment)
If the instance argument to
foo
is not marked irrelevant, then the error isI think it's trying to compare
z n ⦃ p ⦄
withz n ⦃ s≤s' ⦄
, which should succeed but fails (why?)The text was updated successfully, but these errors were encountered: