anchor.diff:  
   let SUM_RESTRICT_SET = 
       prove
  -        ((parse_term 
  -              "!P s f. sum {x | x IN s /\ P x} f = sum s (\x. if P x then f x else &0)"), 
  +        ((parse_term @"!P s f. sum {x | x IN s /\ P x} f = sum s (\x. if P x then f x else &0)"), 
            ONCE_REWRITE_TAC [GSYM SUM_SUPPORT]
            |> THEN <| REWRITE_TAC [support; NEUTRAL_REAL_ADD; IN_ELIM_THM]
            |> THEN <| REWRITE_TAC [MESON [] 
  -                                     (parse_term 
  -                                          "~((if P x then f x else a) = a) <=> P x /\ ~(f x = a)")
  +                                     (parse_term @"~((if P x then f x else a) = a) <=> P x /\ ~(f x = a)")
                                    GSYM CONJ_ASSOC]
            |> THEN <| REPEAT GEN_TAC
            |> THEN <| MATCH_MP_TAC SUM_EQ
  
positive.code:              |> THEN <| DISCH_TAC
               |> THEN 
               <| SUBGOAL_THEN 
                      (parse_term 
                           "{y | y IN IMAGE (f:A->B) s /\ (f x = y)} = {(f x)}") 
                      (fun th -> REWRITE_TAC [th; NSUM_SING; o_THM])
               |> THEN <| REWRITE_TAC [EXTENSION; IN_ELIM_THM; IN_SING; IN_IMAGE]
               |> THEN <| ASM_MESON_TAC []
  
negative.code:                               SUC_SUB1]
           |> THEN 
           <| SUBGOAL_THEN 
                  (parse_term @"!i. i IN 1..SUC n <=> i = 1 \/ 1 < i /\ (i - 1) IN 1..n") 
                  (fun th -> REWRITE_TAC [EXTENSION; IN_IMAGE; th])
           |> THENL <| [REWRITE_TAC [IN_NUMSEG]
                        |> THEN <| ARITH_TAC
  