Built with Alectryon, running Coq+SerAPI v8.10.0+0.7.0. Coq sources are in this panel; goals and messages will appear in the other. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+🖱️ to focus.
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) (* v * INRIA, CNRS and contributors - Copyright 1999-2018 *) (* <O___,, * (see CREDITS file for the list of authors) *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (* * (see LICENSE file for the text of the license) *) (************************************************************************) Require Import Rbase. Require Import Rfunctions. Require Import Rseries. Require Import PartSum. Require Import Omega. Local Open Scope R_scope. Set Implicit Arguments. Section Sigma. Variable f : nat -> R. Definition sigma (low high:nat) : R := sum_f_R0 (fun k:nat => f (low + k)) (high - low).f:nat -> Rforall low high k : nat, (low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highf:nat -> Rforall low high k : nat, (low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highf:nat -> Rlow, high:natH:(low <= 0)%natH0:(0 < high)%natsigma low high = sigma low 0 + sigma 1 highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highsigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high:natH:(low <= 0)%natH0:(0 < high)%natlow = 0%nat -> sigma low high = sigma low 0 + sigma 1 highf:nat -> Rlow, high:natH:(low <= 0)%natH0:(0 < high)%natlow = 0%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highsigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high:natH:(low <= 0)%natH0:(0 < high)%natH1:low = 0%natsum_f_R0 (fun k : nat => f k) high = f 0 + sum_f_R0 (fun k : nat => f (S k)) (Init.Nat.pred high)f:nat -> Rlow, high:natH:(low <= 0)%natH0:(0 < high)%natH1:low = 0%natInit.Nat.pred high = (high - 1)%natf:nat -> Rlow, high:natH:(low <= 0)%natH0:(0 < high)%natlow = 0%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highsigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high:natH:(low <= 0)%natH0:(0 < high)%natH1:low = 0%nat(0 < high)%natf:nat -> Rlow, high:natH:(low <= 0)%natH0:(0 < high)%natH1:low = 0%natInit.Nat.pred high = (high - 1)%natf:nat -> Rlow, high:natH:(low <= 0)%natH0:(0 < high)%natlow = 0%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highsigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high:natH:(low <= 0)%natH0:(0 < high)%natH1:low = 0%natInit.Nat.pred high = (high - 1)%natf:nat -> Rlow, high:natH:(low <= 0)%natH0:(0 < high)%natlow = 0%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highsigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high:natH:(low <= 0)%natH0:(0 < high)%natlow = 0%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highsigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highsigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S k -> sigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma low high = sigma low k + f (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma low k + f (S k) = sigma low (S k)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma low high = sigma low k + sigma (S k) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma (S k) high = f (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma low k + f (S k) = sigma low (S k)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%nat(low <= k)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%nat(k < high)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma (S k) high = f (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma low k + f (S k) = sigma low (S k)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%nat(k < high)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma (S k) high = f (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma low k + f (S k) = sigma low (S k)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma (S k) high = f (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma low k + f (S k) = sigma low (S k)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsum_f_R0 (fun k0 : nat => f (S k + k0)) (high - S k) = f (S k) + sum_f_R0 (fun k0 : nat => f (S (S k) + k0)) (Init.Nat.pred (high - S k))f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natInit.Nat.pred (high - S k) = (high - S (S k))%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma low k + f (S k) = sigma low (S k)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsum_f_R0 (fun k0 : nat => f (S k + k0)) (high - S k) = f (S k + 0) + sum_f_R0 (fun k0 : nat => f (S (S k) + k0)) (Init.Nat.pred (high - S k))f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natInit.Nat.pred (high - S k) = (high - S (S k))%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma low k + f (S k) = sigma low (S k)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsum_f_R0 (fun k0 : nat => f (S k + k0)) (high - S k) = f (S k + 0) + sum_f_R0 (fun k0 : nat => f (S k + S k0)) (Init.Nat.pred (high - S k))f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsum_f_R0 (fun k0 : nat => f (S k + S k0)) (Init.Nat.pred (high - S k)) = sum_f_R0 (fun k0 : nat => f (S (S k) + k0)) (Init.Nat.pred (high - S k))f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natInit.Nat.pred (high - S k) = (high - S (S k))%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma low k + f (S k) = sigma low (S k)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%nat(0 < high - S k)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsum_f_R0 (fun k0 : nat => f (S k + S k0)) (Init.Nat.pred (high - S k)) = sum_f_R0 (fun k0 : nat => f (S (S k) + k0)) (Init.Nat.pred (high - S k))f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natInit.Nat.pred (high - S k) = (high - S (S k))%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma low k + f (S k) = sigma low (S k)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsum_f_R0 (fun k0 : nat => f (S k + S k0)) (Init.Nat.pred (high - S k)) = sum_f_R0 (fun k0 : nat => f (S (S k) + k0)) (Init.Nat.pred (high - S k))f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natInit.Nat.pred (high - S k) = (high - S (S k))%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma low k + f (S k) = sigma low (S k)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%nati:natH3:(i <= Init.Nat.pred (high - S k))%natf (S (S k) + i) = f (S (S k) + i)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%nati:natH3:(i <= Init.Nat.pred (high - S k))%nat(S (S k) + i)%nat = (S k + S i)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natInit.Nat.pred (high - S k) = (high - S (S k))%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma low k + f (S k) = sigma low (S k)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%nati:natH3:(i <= Init.Nat.pred (high - S k))%nat(S (S k) + i)%nat = (S k + S i)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natInit.Nat.pred (high - S k) = (high - S (S k))%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma low k + f (S k) = sigma low (S k)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natInit.Nat.pred (high - S k) = (high - S (S k))%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma low k + f (S k) = sigma low (S k)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natInit.Nat.pred (high - S k) = (high - S k - 1)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%nat(high - S k - 1)%nat = (high - S (S k))%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma low k + f (S k) = sigma low (S k)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%nat(high - S k - 1)%nat = (high - S (S k))%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma low k + f (S k) = sigma low (S k)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsigma low k + f (S k) = sigma low (S k)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsum_f_R0 (fun k0 : nat => f (low + k0)) (k - low) + f (S k) = sum_f_R0 (fun k0 : nat => f (low + k0)) (S (k - low))f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natS (k - low) = (S k - low)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natsum_f_R0 (fun k0 : nat => f (low + k0)) (k - low) + f (low + S (k - low)) = sum_f_R0 (fun k0 : nat => f (low + k0)) (S (k - low))f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%nat(low + S (k - low))%nat = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natS (k - low) = (S k - low)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%nat(low + S (k - low))%nat = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natS (k - low) = (S k - low)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:(low <= k)%natS (k - low) = (S k - low)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksigma low high = sigma low (S k) + sigma (S (S k)) highf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksum_f_R0 (fun k0 : nat => f (low + k0)) (high - low) = f (low + 0) + sum_f_R0 (fun k0 : nat => f (S (low + k0))) (Init.Nat.pred (high - low))f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S kInit.Nat.pred (high - low) = (high - S low)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksum_f_R0 (fun k0 : nat => f (low + k0)) (high - low) = f (low + 0) + sum_f_R0 (fun k0 : nat => f (low + S k0)) (Init.Nat.pred (high - low))f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksum_f_R0 (fun k0 : nat => f (low + S k0)) (Init.Nat.pred (high - low)) = sum_f_R0 (fun k0 : nat => f (S (low + k0))) (Init.Nat.pred (high - low))f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S kInit.Nat.pred (high - low) = (high - S low)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S k(0 < high - low)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksum_f_R0 (fun k0 : nat => f (low + S k0)) (Init.Nat.pred (high - low)) = sum_f_R0 (fun k0 : nat => f (S (low + k0))) (Init.Nat.pred (high - low))f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S kInit.Nat.pred (high - low) = (high - S low)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S k(low < high)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksum_f_R0 (fun k0 : nat => f (low + S k0)) (Init.Nat.pred (high - low)) = sum_f_R0 (fun k0 : nat => f (S (low + k0))) (Init.Nat.pred (high - low))f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S kInit.Nat.pred (high - low) = (high - S low)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ksum_f_R0 (fun k0 : nat => f (low + S k0)) (Init.Nat.pred (high - low)) = sum_f_R0 (fun k0 : nat => f (S (low + k0))) (Init.Nat.pred (high - low))f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S kInit.Nat.pred (high - low) = (high - S low)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ki:natH3:(i <= Init.Nat.pred (high - low))%natf (low + S i) = f (low + S i)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ki:natH3:(i <= Init.Nat.pred (high - low))%nat(low + S i)%nat = S (low + i)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S kInit.Nat.pred (high - low) = (high - S low)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S ki:natH3:(i <= Init.Nat.pred (high - low))%nat(low + S i)%nat = S (low + i)f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S kInit.Nat.pred (high - low) = (high - S low)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) highH1:(low <= k)%nat \/ low = S kH2:low = S kInit.Nat.pred (high - low) = (high - S low)%natf:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kinversion H; [ right; reflexivity | left; assumption ]. Qed.f:nat -> Rlow, high, k:natH:(low <= S k)%natH0:(S k < high)%natHreck:(low <= k)%nat -> (k < high)%nat -> sigma low high = sigma low k + sigma (S k) high(low <= k)%nat \/ low = S kf:nat -> Rforall low high k : nat, (low <= k)%nat -> (k < high)%nat -> sigma low high - sigma low k = sigma (S k) highintros low high k H1 H2; symmetry ; rewrite (sigma_split H1 H2); ring. Qed.f:nat -> Rforall low high k : nat, (low <= k)%nat -> (k < high)%nat -> sigma low high - sigma low k = sigma (S k) highf:nat -> Rforall low high k : nat, (low <= k)%nat -> (k < high)%nat -> sigma low k - sigma low high = - sigma (S k) highintros low high k H1 H2; rewrite (sigma_split H1 H2); ring. Qed.f:nat -> Rforall low high k : nat, (low <= k)%nat -> (k < high)%nat -> sigma low k - sigma low high = - sigma (S k) highf:nat -> Rforall low high : nat, (low < high)%nat -> sigma low high = f low + sigma (S low) highf:nat -> Rforall low high : nat, (low < high)%nat -> sigma low high = f low + sigma (S low) highf:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%natsigma low high = sigma low low + sigma (S low) highf:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%natsigma low low = f lowf:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%nat(low <= low)%natf:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%nat(low < high)%natf:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%natsigma low low = f lowf:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%nat(low < high)%natf:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%natsigma low low = f lowf:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%natsigma low low = f lowf:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%natsum_f_R0 (fun k : nat => f (low + k)) 0 = f lowreplace (low + 0)%nat with low; [ reflexivity | ring ]. Qed.f:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%natf (low + 0) = f lowf:nat -> Rforall low high : nat, (low < high)%nat -> sigma low high = f high + sigma low (Init.Nat.pred high)f:nat -> Rforall low high : nat, (low < high)%nat -> sigma low high = f high + sigma low (Init.Nat.pred high)f:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%natsigma low high = sigma high high + sigma low (Init.Nat.pred high)f:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%natsigma high high = f highf:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%nathigh = S (Init.Nat.pred high) -> sigma low high = sigma low (Init.Nat.pred high) + sigma high highf:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%nathigh = S (Init.Nat.pred high)f:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%natsigma high high = f highf:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%natH:high = S (Init.Nat.pred high)sigma low high = sigma low (Init.Nat.pred high) + sigma (S (Init.Nat.pred high)) highf:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%nathigh = S (Init.Nat.pred high)f:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%natsigma high high = f highf:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%natH:high = S (Init.Nat.pred high)(low <= Init.Nat.pred high)%natf:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%natH:high = S (Init.Nat.pred high)(Init.Nat.pred high < high)%natf:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%nathigh = S (Init.Nat.pred high)f:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%natsigma high high = f highf:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%natH:high = S (Init.Nat.pred high)(Init.Nat.pred high < high)%natf:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%nathigh = S (Init.Nat.pred high)f:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%natsigma high high = f highf:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%nathigh = S (Init.Nat.pred high)f:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%natsigma high high = f highunfold sigma; rewrite <- minus_n_n; simpl; replace (high + 0)%nat with high; [ reflexivity | ring ]. Qed.f:nat -> Rlow, high:natH1:(low < high)%natH2:(S low <= high)%natH3:(low <= high)%natsigma high high = f highf:nat -> Rforall low : nat, sigma low low = f lowf:nat -> Rforall low : nat, sigma low low = f lowsimpl; replace (low + 0)%nat with low; [ reflexivity | ring ]. Qed. End Sigma.f:nat -> Rlow:natsum_f_R0 (fun k : nat => f (low + k)) 0 = f low