Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12231

How to write a predicate checking types in lean?

$
0
0

Say I define a couple of new types in Lean 4:

inductive A : Typeinductive B : Typeinductive C : Type

I want a predicate that returns true if the provided parameter's type is A, and false otherwise. Something like this:

boolean myPredicate ( provided : Type ) {    if typeof ( provided ) == A then        return TRUE;    else        return FALSE; }

How should I proceed?


Viewing all articles
Browse latest Browse all 12231

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>