anchor.diff: -﻿///
  -///Copyright 1998 University of Cambridge
  -///Copyright 1998-2007 John Harrison
  -///Copyright 2013 Jack Pappas, Eric Taucher
  -///
  -///Licensed under the Apache License, Version 2.0 (the "License");
  -///you may not use this file except in compliance with the License.
  -///You may obtain a copy of the License at
  -///
  -///    http://www.apache.org/licenses/LICENSE-2.0
  -///
  -///Unless required by applicable law or agreed to in writing, software
  -///distributed under the License is distributed on an "AS IS" BASIS,
  -///WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  -///See the License for the specific language governing permissions and
  -///limitations under the License.
  -///
  -///*)
  +﻿(*
  +
  +Copyright 1998 University of Cambridge
  +Copyright 1998-2007 John Harrison
  +Copyright 2013 Jack Pappas, Eric Taucher
  +
  +Licensed under the Apache License, Version 2.0 (the "License");
  +you may not use this file except in compliance with the License.
  +You may obtain a copy of the License at
  +
  +    http://www.apache.org/licenses/LICENSE-2.0
  +
  +Unless required by applicable law or agreed to in writing, software
  +distributed under the License is distributed on an "AS IS" BASIS,
  +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  +See the License for the specific language governing permissions and
  +limitations under the License.
  +
  +*)
   /// Tools for putting terms in canonical forms.
   module NHol.canon
   
  
positive.code:         TRANS th (strengthen(rand(concl th)))
      weakcnf, strongcnf
  
  ///(* ------------------------------------------------------------------------- *)
  ///(* Simply right-associate w.r.t. a binary operator.                          *)
  ///(* ------------------------------------------------------------------------- *)
  let ASSOC_CONV th = 
      let th' = SYM(SPEC_ALL th)
      let opx, yopz = dest_comb(rhs(concl th'))
  
negative.code:             else REFL tm
      CONDS_ELIM_CONV true, CONDS_ELIM_CONV false
  
  (* ------------------------------------------------------------------------- *)
  (* Fix up all head arities to be consistent, in "first order logic" style.   *)
  (* Applied to the assumptions (not conclusion) in a goal.                    *)
  (* ------------------------------------------------------------------------- *)
  let ASM_FOL_TAC = 
      let rec get_heads lconsts tm (cheads, vheads as sofar) = 
          try 
  