Val inductive_hyp = `even implies _even`(s. pattern matching, so this is a workaround. These dependent types are added because Scala doesn't support type-level My proof requires only a small modification to your Nat definition to work around a missing feature in Scala. It may be impossible to prove ex falso for an arbitrary uninhabited type in Scala, but it's still possible to prove that Even] => Nothing. A shorter example of why EFQ could be needed: sealed trait BottomÄef `bottom implies anything`(btm: Bottom): Any = ? I can construct another simple contradiction: ab.
At the bottom of the comments someone else provided another contradiction. Note: Proving that one is odd could be done with another (but equivalent) definition of evenness - but that is not the point. The OP himself admits at the end that for his definition to work he has to throw associativity and commutivity out of the window and that is only the tip of the iceberg. Maybe I am barking up the wrong tree, is a pattern match the wrong idea - could EFQ be shown in some other way? Is there any way to prove this constructively? If empty pattern matches is the way to go - I'd accept any version of Scala or even a macro or plugin, as long as I still get errors for empty pattern matches when the type is inhabited. Ex falso quodlibet, eigentlich ex falso sequitur quodlibet, abgekrzt zu e.f.q. The compiler will happily tell me that none of the cases I've given are possible with the error pattern type is incompatible with expected type, but leaving the match block empty will be a compile error. In Scala it is possible to define the natural numbers on a type level, e.g. In this paper, we create a logical system that is exactly the same as Classical Logic apart from the fact that, when we have a material implication. Here is a short example of why it would be useful. mnt-by: RIPE-NCC-HM-MNT created: last-modified: source: RIPE % Information related to 'AS34011' % Abuse contact for 'AS34011' is aut-num: AS34011 as-name: GD-EMEA-DC-CGN1 org: ORG-OG1-RIPE admin-c: HM5126-RIPE tech-c: HM5126-RIPE status: ASSIGNED mnt-routes: MNT-HEG-MASS mnt-by: MNT-HEG-MASS mnt-by: MNT-HEG mnt-by: RIPE-NCC-END-MNT created: last-modified: source: RIPE organisation: ORG-OG1-RIPE org-name: Host Europe GmbH org-type: LIR address: Hansestrasse 79 address: 51149 address: Cologne address: GERMANY phone: +49220399347575 admin-c: JOKO admin-c: HONK admin-c: SEPP admin-c: MOMO admin-c: METT abuse-c: HEAH mnt-ref: RIPE-NCC-HM-MNT mnt-ref: MNT-HEG mnt-by: RIPE-NCC-HM-MNT mnt-by: MNT-HEG created: last-modified: source: RIPE # Filtered role: HEG Mass address: HEG Mass address: Daimler Strasse 9-11 address: 50354 Huerth address: Germany phone: +49 2203 1045 0 admin-c: JUPP admin-c: OUZO tech-c: JUPP tech-c: OUZO nic-hdl: HM5126-RIPE mnt-by: MNT-HEG-MASS created: last-modified: source: RIPE # Filtered % This query was served by the RIPE Database Query Service version 1.91.How do I show that anything follows from a value of a type with no constructors in Scala? I would like to do a pattern match on the value and have Scala tell me that no patterns can match, but I am open for other suggestions. % Information related to 'AS33792 - AS35839' as-block: AS33792 - AS35839 descr: RIPE NCC ASN block remarks: These AS Numbers are assigned to network operators in the RIPE NCC service region. % To receive output for a database update, use the "-B" flag. % See % Note: this output has been filtered.
% % The RIPE Database is subject to Terms and Conditions. % This is the RIPE Database query service.