complete inner logic