-
I would like to prove the following:
```
import data.set
namespace function
section
open set
variables {A B : Type}
definition bijective (f : A → B) := injective f ∧ surjective f
lemma injective_eq_i…
-
```
Agda version 2.3.2
The following code compiles:
module test where
data U : Set where
a b : U
data A : Set where
data B : Set where
abstract
A' B' : Set
…
-
I tried the code example in [#9587](https://ghc.haskell.org/trac/ghc/ticket/9587) in hope it will work thanks to injectivity:
``` haskell
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE TypeF…
-
I say:
``` haskell
class C a b where
type FC a (b :: *) = r | r -> b
type instance FC a b = b
instance C Char a
```
and GHC responds:
```
T6018.hs:1:1:
Type family equation violates in…
-
In his proof Richard showed that this definition should not be accepted as injective:
``` haskell
type family F a = r | r -> a
type instance F [a] = a
```
Reason: `F [F Int] ~ F Int` (from equation …
-
```
module PostulatesVsParameters {A : Set} where
-- Works:
module M₁ where
postulate f : A → A
data D : A → Set where
d : ∀ x → D (f x)
foo : ∀ {x} → D (f x) → A
foo (d x) = x
-- Do…
-
This definition is accepted although it shouldn't:
``` haskell
type family F a b = r | r -> a b where
F a IO = IO a
F Char b = b Int
```
The problem lies in the implementation o…
-
If I say
``` haskell
type family F (a :: k1) = (r :: k2) | r -> a
```
then `a` and `k1` are marked as injective. But `k2` is also the input parameter to `F` and so it seems to make sense to mark it …
-
I don't have a small example of this yet, but I get this exception:
```
Exception- HOL_ERR {message = "proof translation error", origin_function = "fol_thms_to_hol", origin_structure = "folMapping"}
…
xrchz updated
9 years ago
-
What happens if I say:
``` haskell
type family F a b = r | r -> a where
F Int b = b
```
? Here `b` is not declared as injective but is mentioned in the RHS.