Unfolding a proof term in Coq
I wonder if there is a way to obtain the proof term (serialized via Print or not) at some level beyond the current context (or just down to primitives). For example, executing the following From mathcomp Require Import odd_order.PFsection14. Print Feit_Thompson. results in Feit_Thompson = fun (gT : fingroup.FinGroup.type) (G : fingroup.group_of (gT:=gT) (ssreflect.Phant (fingroup.FinGroup.arg_sort (fingroup.FinGroup.base gT)))) => BGsection7.minSimpleOdd_ind no_minSimple_odd_group (gT:=gT) (G:=G) : forall (gT : fingroup.FinGroup.type) (G : fingroup.group_of (gT:=gT) (ssreflect.Phant (fingroup.FinGroup.arg_sort (fingroup.FinGroup.base gT)))), is_true (ssrnat.odd (fintype.CardDef.card (T:=fingroup.FinGroup.arg_finType (fingroup.FinGroup.base gT)) (ssrbool.mem (finset.SetDef.pred_of_set (fingroup.gval G))))) -> is_true (nilpotent.solvable (fingroup.gval G)) but i would like to unfold the identifiers (theorems and definitions) used in the proof term such as no_minSimple_odd_group to their proof terms. I suspect that the opacity of theorems and lemmas might pose an obstacle to this purpose. The naive solution i can think of is to recursively query each identifier via Print. Or a less naive (and less ideal due to the change in the language representing the proof term) solution, via program extraction.
I am not sure if there is a direct way of doing that, but it wouldn't be too hard to implement, at this level opacity is just a flag and can be bypassed. However, I wonder about what do you want to achieve? Note that most proof terms obtained that way are going to be just unmanageable, specially unfolding will quickly lead to a worse than exponential size blowup.
can I force Coq to print parentheses?
Coq variable exists in list
What is required for Coq to generate an elimination combinator for an Inductive type?
How to capture parameters under universal quantification (using Modules? Sections?)
Proving for all elements of a list in coq
Coq adding a new variable instead of using the correct one
Simple identity in Coq
Unfold a notation within a scope
Error: Cannot coerce to an evaluable reference in coq
Proof in COQ that equality is reflexivity
How to express “there exists a unique X” in Coq?
Step by step simplification in coq?
Typeclass resolution and autorewrite
Need finding the right tactic over Int.lt
'else' in definitions - Coq
Solving equality / inequality in goal, coq code