kory33 / scala-proofs

An attempt to build axiomatic, formal set theory on top of Scala.
37 stars 1 forks source link

Let universal quantifier implement instantiate[T] method #5

Closed kory33 closed 6 years ago

kory33 commented 6 years ago

Current implementation

∀[F] := ¬[∃[[x] => ¬[F[x]]]]

Why couldn't I define instantiate[T]?

Since scala doesn't support inference of type constructors, I couldn't add implicit class which read the type constructor automatically.

What to do?

I'm not yet sure if the last point is possible or not. Most likely it is possible since double negation elimination is at my disposal.

kory33 commented 6 years ago

Last one is impossible since the inference for F does not work.

kory33 commented 6 years ago

Even if ∀[F] implements ¬[∃[¬[x => F[x]]]], at some point the type constructor has to be explicitly stated between conversions. Unless type constructor inference works in some form, it is entirely impossible to not write a type constructor before generalisation or instantiation.