我有一个记录类型,例如:
Record matrixInt : Type := mkMatrixInt {
const : vector nat dim;
args : vector (matrix dim dim) argCnt
}.
我有一个模式匹配,它返回的类型matrixInt,我称之为p例如:(其中function_name p将返回一个类型matrixInt。我想p分成 2 个字段:const和args,例如我想要的草稿代码:
Definition my_function cons arg p :=
match function_name p with
| const => const + cons
| args => args + arg
end.
您能否帮我编写p返回 2 个字段的模式匹配const; args?非常感谢!