If you generate just types, most of them will be isomorphic to ⊥
. ∀ n m -> n + m ≡ m + n
is meaningful, but ∀ n m -> n + m ≡ n
, ∀ n m -> n + m ≡ suc m
, ∀ n m -> n + m ≡ 0
, ∀ n m xs -> n + m ≡ length xs
and zillions of others are not. You can try to generate well-typed terms and then check, using something like Djinn, that the type of a generated term is not inhabited by a much simpler term. However many generated terms will be either too simple or just senseless garbage even with a clever strategy. Typed setting contains less terms than non-typed, but a type of just one variable can be A
, A -> A
, A -> B
, B -> A
, A -> ... -> E
and all these type variables can be free or universally quantified. Besides, ∀ A B -> A -> B -> B
and ∀ B A -> A -> B -> B
are essentially the same types, so your equality is not just αη, but something more complex. The search space is just too big and I doubt a random generator can produce something really non-trivial.
But maybe terms of some specific form can be interesting. Bakuriu in comments suggested theorems provided by parametricity: you can simply take Data.List.Base
or Function
or any other basic module from Agda standard library and generate many theorems out of thin air. Check also the A computational interpretation of parametricity paper which gives an algorithm for deriving theorems from types in a dependently typed setting (though, I don't know how it's related to Theorems for free and they don't give the rules for data types). But I'm not sure that most produced theorems won't be provable by straightforward induction. Though, theorems about functions that are instances of left folds are usually harder than about those which are instances of right folds — that can be one criteria.