我需要推理向量在Coq中的置換。標準庫僅包含列表的排列定義。正如我的第一次嘗試,我試圖模仿它的載體: Inductive VPermutation: forall n, vector A n -> vector A n -> Prop :=
| vperm_nil: VPermutation 0 [] []
| vperm_skip {n} x l l' : VPermutat
平等鑑於兩個功能: sumOne 0 = 0 -- I.a
sumOne m | m > 0 = sumOne (m-1) + m -- II.a
endSum m = helpSum 0 m -- I.b
where helpSum x 0 = x -- II.b
helpSum x m | m > 0 = helpSum (x