'''
Created on 09-Jan-2024

@author: bthakur
'''

import os
import sys
import re

import codecs
import inspect
import traceback

from xv.util import convertToUtf8, locatePath, Repository
from xv.util.data import NamedProcessor

from xv.util import is_list_tuple_set
from xv.util import UtilClass

from xv.km.entities import NamedEntity, NamedEntityFactory, NamedEntities

# _integration_entities
# IntegrationEntities

class IntegrationEntities(NamedEntities):
    
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        
        self._init_default_entities()
        pass
    
    def _init_default_entities(self):
        from sympy import (Symbol, sin, cos, tan, log,
                           Integral, 
                           Eq, 
                           simplify, )
        x = Symbol('x')
        n = Symbol('n',  constant = True)
        

        exprs = []
        exprs.append(Integral(x**n, x))
        exprs.append(Integral(log(x), x))
        exprs.append(Integral(1/x, x))
        exprs.append(Integral(sin(x), x))
        exprs.append(Integral(cos(x), x))
        exprs.append(Integral(tan(x), x))
        
        
        for expr_item in exprs:
            eq = Eq(expr_item, simplify(expr_item.doit()))
            named_entity = NamedEntity(expr = eq, 
                                       verbose = self.verbose)
            self.add_entity(named_entity)
            pass
        
        pass
            
    pass
#class IntegrationEntities:
