anchor.diff:  
   //--Функция которая удаляет правила в правиле------------------------------------------------------
   
  -let reductionRule (ruleList: Rule.t<_, _> list) = 
  +let private reductionRule (ruleList: Rule.t<_, _> list) = 
   
       let reduction = ref []
       
       let rec addRule (rule: Rule.t<_, _>) (elements: elem<_, _> list) = 
           [{
  -            Rule.t.name = rule.name
  -            Rule.t.args=rule.args
  -            Rule.t._public=rule._public
  -            Rule.t.metaArgs=rule.metaArgs
  -            Rule.t.body=PSeq(elements 
  +            name = rule.name
  +            args=rule.args
  +            _public=rule._public
  +            metaArgs=rule.metaArgs
  +            body=PSeq(elements 
                   |> List.collect
  -                    (fun elem -> 
  -                        match elem.rule with
  -                        |PSeq(e, a, l) -> 
  -                            incr index
  -                            let i = !index
  -                            reduction := addRule {                         
  -                                    Rule.t.name = "newRuleInRule" + (!index).ToString()
  -                                    Rule.t.args=[]
  -                                    Rule.t._public=false
  -                                    Rule.t.metaArgs=[]
  -                                    Rule.t.body=elem.rule
  -                                } e @ !reduction
  -                            [{
  -                                Production.elem.omit = false
  -                                Production.elem.binding = None
  -                                Production.elem.checker = None
  -                                Production.elem.rule = Production.t.PRef(("newRuleInRule" + (i).ToString(), (0, 0)), None)
  -                            }]
  -                        |x -> [elem]
  -                    ), None, None)
  +                            (fun elem -> 
  +                                match elem.rule with
  +                                |PSeq(e, a, l) -> 
  +                                    incr index
  +                                    let i = !index
  +                                    reduction := addRule {                         
  +                                            name = "newRuleInRule" + (!index).ToString()
  +                                            args=[]
  +                                            _public=false
  +                                            metaArgs=[]
  +                                            body=elem.rule
  +                                        } e @ !reduction
  +                                    [{
  +                                        omit = false
  +                                        binding = None
  +                                        checker = None
  +                                        rule = PRef(("newRuleInRule" + (i).ToString(), (0, 0)), None)
  +                                    }]
  +                                |x -> [elem]
  +                            ), 
  +                            (match rule.body with PSeq(e, a, l) -> a | x -> None), 
  +                            (match rule.body with PSeq(e, a, l) -> l | x -> None) )
           }]
   
       let newRule = 
  
positive.code: 
  //--Функция для удаления цепных правил-------------------------------------------------------------
                  
  let deleteChainRule (ruleList: Rule.t<_, _> list) = ruleList
  
  //--Преобразование в КНФ---------------------------------------------------------------------------
  
  
negative.code: open Yard.Core.IL
  open Yard.Core.IL.Production
  open System.Collections.Generic
  open Yard.Core.IL.Rule
  
  //--Тестовые функции-------------------------------------------------------------------------------
  
  